JQ表单序列化变成 对象

xiaoxiao2021-02-28  89

JQ表单序列化变成 对象

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; }

 

、、、、、、、、、、、、、

 

 

function serializeObject(form)  调用函数

 

结果变成一个对象

转载请注明原文地址: https://www.6miu.com/read-40865.html

最新回复(0)