DataTable:隐藏“显示条目”下拉列表,但保留“搜索”框 [英] DataTable: Hide the Show Entries dropdown but keep the Search box
本文介绍了DataTable:隐藏“显示条目”下拉列表,但保留“搜索”框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以隐藏显示条目下拉列表,但将搜索框保留在DataTable中?我希望始终在搜索框旁边显示10页的底部分页,但不希望显示显示条目下拉列表。
Is it possible to hide the Show Entries dropdown but keep the Search box in DataTable? I want to always display 10 rows with pagination at the bottom along with search box but do not want to display the Show entries dropdown.
提前感谢。
推荐答案
您可以直接在此链接上找到更多信息: http://datatables.net/examples/basic_init/filter_only.html
You can find more information directly on this link: http://datatables.net/examples/basic_init/filter_only.html
$(document).ready(function() {
$('#example').dataTable({
"bPaginate": false,
"bLengthChange": false,
"bFilter": true,
"bInfo": false,
"bAutoWidth": false });
});
希望有帮助!
编辑:如果你是懒惰的,bLengthChange:false,是你需要改变的:)
EDIT : If you are lazy, "bLengthChange": false, is the one you need to change :)
这篇关于DataTable:隐藏“显示条目”下拉列表,但保留“搜索”框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文