$.fn.serializeObject = function() { var o = {}; var a = this.serializeArray(); $.each(a, function() { if (o[this.name]) { if (!o[this.name].push) { o[this.name] = [o[this.name]]; } o[this.name].push(this.value || ''); } else { o[this.name] = this.value || ''; } }); return o; };
form表单序列化结果成为json格式的
猜你喜欢
转载自blog.csdn.net/qq_24434061/article/details/80513300
今日推荐
周排行