js封装如何封装及实例

2025-06-09 13:50:58

1、var contextPath = document.location.pathname;contextPath = contextPath.substr(0,contextPath.substr(1).indexOf("/")+1)+"/a";/*** jqgrid通用列表展示 后期还需要封装* @param tableList* @param columns* @param config*/function searchDataList(tableList , columns, config){ var formJson = ""; if(document.getElementById("searchForm")) formJson = changeAjaxFormData($('#searchForm')); tableList.jqGrid({ url: config.url, datatype: "json", toolbar: config.toolbar, styleUI: 'Bootstrap',// 设置jqgrid的全局样式为bootstrap样式 colModel:columns, postData:formJson, // 发送数据 viewrecords: true,

js封装如何封装及实例

2、 autowidth: true, height: "100%", altRows:true, rowNum: 30, rowList : [30,60,100], rownumbers: true, rownumWidth: 25, autowidth:true, multiselect: config.multiselect, pager: "#jqGridPager", jsonReader : { root: "list", page: "pageNo", total: "last", records: "count" },

js封装如何封装及实例

3、 prmNames : { page:"pageNo", rows:"pageSize", order: "order" }, gridComplete:function(){ tableList.closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" }); }});}

js封装如何封装及实例
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢