Datatables Jquery数据表搜索绘制切换

Datatables Jquery数据表搜索绘制切换,datatables,Datatables,jquery数据表1.10+ var resourceTable = $("#testTable").DataTable({}); resourceTable.search('searchKey').draw(); 搜索很好,但当我想清除时,似乎没有API支持。使用空字符串清除搜索框,如下所示: resourceTable.search('').draw(); 有关更多信息,请参阅API方法。感谢您的帖子,我使用的解决方案与您完全相同

jquery数据表1.10+

var resourceTable = $("#testTable").DataTable({});
resourceTable.search('searchKey').draw();

搜索很好,但当我想清除时,似乎没有API支持。

使用空字符串清除搜索框,如下所示:

resourceTable.search('').draw();

有关更多信息,请参阅API方法。

感谢您的帖子,我使用的解决方案与您完全相同