jquery easyui将form表单元素的值序列化成对象

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

 

你可能感兴趣的:(jquery easyui)