DataTables在表下放置搜索和条目过滤器?

Maa*_*aat 3 datatable jquery

我可以将Show entires过滤器放在表格下方而不是表格上方的搜索过滤器中吗?

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

而且我知道我可以放置位置:绝对和东西,但我想要桌面下的那些东西的HTML代码.

Maa*_*aat 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>'
Run Code Online (Sandbox Code Playgroud)