标签:
1.jqgrid中获取选中行
var rows = jQuery("#gridTable").jqGrid(‘getGridParam‘,‘selarrrow‘);
2.获取某一行数据
var ret = jQuery("#gridTable").jqGrid(‘getRowData‘,rows[i]);
3.把form表单序列化为json格式
$.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; };
调用时:var data = $(‘#searchForm‘).serializeObject();
标签:
原文地址:http://www.cnblogs.com/jiangyaqiong/p/5783445.html