标签:
function serliaze(form) { //序列化表单
var obj = {};
$.each(form.serializeArray(), function (index) {
if (obj[this[‘name‘]]) {
obj[this[‘name‘]] = obj[this[‘name‘]] + ‘,‘ + this[‘value‘];
} else {
obj[this[‘name‘]] = this[‘value‘];
}
});
return obj;
}
标签:
原文地址:http://www.cnblogs.com/jinhaoObject/p/4636095.html