我可以将Show entires过滤器放在桌子下面而不是桌子上方的搜索过滤器中吗?
请参阅:http://datatables.net/release-datatables/examples/basic_init/alt_pagination.html
而且我知道我可以放置位置:绝对和东西但是我想要那些东西的HTML代码。
答案 0 :(得分:7)
找到解决方案:
"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>'
答案 1 :(得分:1)
将您的Div放在任何您想要的地方
$('div.dataTables_filter').appendTo("#filterdata");
<div id="filterdata">
</div>