0
我使用datatable插件並希望通過ajax刷新表。我讀過here以使我的ajax返回表中顯示,但它不起作用。這裏是我的html代碼:通過ajax和json重新加載數據表
<button type="button" onclick="rld()">test</button>
<table id="sample_1">
<thead>
<tr>
<th> 1 </th>
<th> 2 </th>
<th> 3 </th>
</tr>
</thead>
</table>
我的Java功能:
我不能得到的是什麼問題。有沒有警報,但在控制檯我得到TypeError:f是undefined 和TypeError:c是undefined 我不知道爲什麼導致我的json返回是正確的(在[JSONLint] [3]中檢查)。 在此先感謝。
http://stackoverflow.com/a/33651126/244811? – sweaver2112
您使用的是哪個版本的數據表? – Kisaragi
table.api()。ajax.reload(null,false); https://datatables.net/reference/api/ajax.reload() –