代碼如下:
function serializeobject(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;
}
更多信息請查看IT技術專欄