0

有没有人从一个页面向另一个页面上的 dataTables jquery 插件发送搜索请求?我不确定它是否甚至设计为那样工作。

4

2 回答 2

1

I think this is what you are looking for:

$('#dataTableBLOCK').dataTable( {
    "oSearch": {"sSearch": "YOUR-SEARCH-VALUE"},
    "bProcessing": true,
    "bServerSide": true,
    "sAjaxSource": "NAME-OF-DATATABLES-FILE.php"
} );

By changing YOUR-SEARCH-VALUE to a $_POST or $_GET value you make dataTables search what you were searching somewhere else.

于 2011-05-16T13:28:15.660 回答
0

我非常确定只有当您在同一页面中时搜索才会起作用。使用 dataTables 插件时,搜索框会过滤表格的显示行。

于 2010-05-17T15:11:07.180 回答