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() –