我可以将搜索过滤器中的“显示整体”过滤器放置在表格下方而不是表格上方吗?
参见: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/