代码实现:
$.ajax({ url: '../zjjgx/searchDataThree?searchDjbhThree='+searchDjbhThree+'&searchXybhThree='+searchXybhThree+'&searchHtbhThree='+searchHtbhThree, dataType: 'json', success: function (obj) { if (obj.success){ table.reload('thirdTable',{ page: { curr: 1 //重新从第 1 页开始 } }, 'data'); }else { location.reload(); } }, error: function () { location.reload(); } });
参数说明:
thirdTable :数据表格的id
table.render({ elem: '#test3' ,url:'/zjjgx/getDataThree' ,toolbar: '#toolbarDemo3' //开启头部工具栏 ,defaultToolbar: ['filter'] ,title: '资金监管箱' ,initSort: { field: 'qdrq' ,type: 'desc' } ,cols: [ [ {type: 'radio', fixed: 'left'} ,{field:'', title:'序号', width:50,type:'numbers', fixed: 'left'} ,{field:'djbh', title:'登记编号', width:120,sort:true} ,{field:'xybh', title:'协议编号',event:'xybh', width:120} ,{field:'ywxx', title:'业务细项', width:100} ,{field:'zrf', title:'转让方', width:100} ,{field:'srf', title:'受让方', width:100} ,{field:'zqr', title:'支取人', width:100} ,{field:'fwzl', title:'房屋坐落', width:100} ,{field:'qzhm', title:'权证号码', width:120} ,{field:'htbh', title:'合同编号', width:120,sort:true} ,{field:'dqblr', title:'当前办理人', width:100} ,{field:'bldw', title:'办理单位', width:100} ,{field:'qdrq', title:'签订日期', width:100} ,{field:'sfcx', title:'是否撤销', width:100} ] ] ,page: true ,id: 'thirdTable' });
layui 官网说明: