jqgrid form序列化

来源:互联网 发布:蛇吞象是真的吗 知乎 编辑:程序博客网 时间:2024/05/16 02:55
1、
$.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;

};

2、
postData: $("#queryForm").serializeObject()}

0 0
原创粉丝点击