datagrid初始化的时候请求两次URL
<table id="gridview" class="easyui-datagrid"></table>
$(function(){ $("#gridview").datagrid({ url:"getData.do", title:"列表", singleSelect:false, pagination:true, toolbar:"#toolbar", method:"get", columns:[[ {field:"ck",checkbox:true }, {field:"id",title:"ID",width:20,sortable:true }, {field:"kindName",title:"名称",width:100,resizable:true,sortable:true}, {field:"createDate",title:"创建日期",width:80,resizable:true,sortable:true} ]] }); })
由于在grid的table中写了class="easyui-datagrid",另外在初始化的js中有了URL这样就会请求两次getData.do了,将class="easyui-datagrid"去掉即可。
时间: 2024-10-10 16:14:28