jquery - 数据表将搜索和条目过滤器放在表下?

标签 jquery datatable

我可以将搜索过滤器中的“显示整体”过滤器放置在表格下方而不是表格上方吗?

参见:http://datatables.net/release-datatables/examples/basic_init/alt_pagination.html

我知道我可以放置一个position:absolute和其他东西,但我想要这些东西的 HTML 代码在 table 下面。

最佳答案

找到解决方案:

"sDom": 't<plf>'

This initialisation variable allows you to specify exactly where in the DOM you want DataTables to inject the various controls it adds to the page (for example you might want the pagination controls at the top of the table). DIV elements (with or without a custom class) can also be added to aid styling. The follow syntax is used:
The following options are allowed:

'l' - Length changing
'f' - Filtering input
't' - The table!
'i' - Information
'p' - Pagination
'r' - pRocessing
The following constants are allowed:
'H' - jQueryUI theme "header" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix')
'F' - jQueryUI theme "footer" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix')
The following syntax is expected:
'<' and '>' - div elements
'<"class" and '>' - div with a class
'<"#id" and '>' - div with an ID
Examples:
'<"wrapper"flipt>', '<lf<t>ip>'

关于jquery - 数据表将搜索和条目过滤器放在表下?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8355638/

相关文章:

jquery - 使 div 的高度为父元素的 100% 以及其他带有 float 的 div 子元素

JavaScript 请求 JSON 信息。返回错误结果

javascript - 添加后选择一行

angular - p-dataTable 行上的鼠标悬停事件 (primeNg)

javascript - 使用 Jquery cookie 存储 div 的切换状态?

javascript - 将选择选项和 optgroup 存储在 JavaScript 数组中

sql - Excel数据表(SQL查询): Once deleted column no longer shows up

javascript - 具有 "asc"和 "desc"的多列排序的数据表

javascript - 如何在onclick函数中选择动态div

jquery - 对排除第一条记录的 jquery 数据表列进行排序