r d = {}; var t = $('form').serializeArray(); $.each(t, function() { d[this.name] = this.value; }); console.log(JSON.stringify(d)) console.log(d)
直接复制粘贴进去你的代码
r d = {}; var t = $('form').serializeArray(); $.each(t, function() { d[this.name] = this.value; }); console.log(JSON.stringify(d)) console.log(d)
直接复制粘贴进去你的代码