将form表单中的元素转换成对象的方法适用表单提交
摘要:复制代码代码如下:functionserializeObject(form){varo={};$.each(form.serializeAr...
复制代码 代码如下:
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;
}
【将form表单中的元素转换成对象的方法适用表单提交】相关文章:
★ JavaScript中的Math.sin()方法使用详解
上一篇:
jsPDF导出pdf示例
下一篇:
jQuery实现的多选框多级联动插件