LeM*_*sel 6 search jquery filtering datatables drop-down-menu
我正在使用DataTables Table插件用于jQuery,但是我无法获得全局输入搜索框将是一个选择框.
使用sDOM选项lrtip,不会显示过滤输入,但是是否可以显示选择框并根据选择框的更改来过滤数据表?
JS:
$(document).ready(function() {
var table = $('#table_page').DataTable( {
paging: true,
ordering: false,
info: true,
searching: true,
sDom: "lrtip" // default is lfrtip, where the f is the filter
});
});
Run Code Online (Sandbox Code Playgroud)
HTML:
<table id="table_page" class="display cell-border" width="100%">
<thead>
<tr>
<th>Column 1</th>
<th>Column 2</th>
</tr>
</thead>
</table>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
20299 次 |
| 最近记录: |