解決辦法就是:一開始的url屬性設置為空,例如:
<table id="dg" title="用戶管理" class="easyui-datagrid" style="fit:false"
url=""
toolbar="#toolbar" pagination="true"
rownumbers="true" fitColumns="true" singleSelect="true">
...
</table>
然后在查詢的時候對應如下代碼:
$('#dg').datagrid({url: '/tz_lawsuits_get'});