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; }
把easyui中的form表单中查询条件的属性序列成对象返回
调用实例:
var seachform=$(‘#myform‘).form();$(‘#wow-goods-dg‘).datagrid(‘load‘,serializeObject(seachform));
时间: 2024-10-23 21:15:24