把form表单序列化成键值对集合
window.serializeObj = function(form){
var o ={ };
$.each{form.serializeArray(),function(index){
if(o[this['name']])
{
o[this['name']] = o[this['name']] +","+ this['value'];
}
else{
o[this['name']] = this['value'];
}
return o;
}}
//调用
var obj =serializeObj($("#form1")) //#form1 表单ID
}