过滤dataTables.net而不包括过滤器框输入 [英] Filter dataTables.net without included filter-box input
本文介绍了过滤dataTables.net而不包括过滤器框输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用DataTables的过滤器功能,但不想使用它们的搜索框。
I want to use the filter function of DataTables, but don't want to use their search box with it.
在他们的文档中,bFilter说:
In their docs under bFilter it says:
请注意如果您希望在DataTables中使用过滤器,则必须保持真实 - 删除默认过滤输入框并保留过滤功能,请使用
Note that if you wish to use filtering in DataTables this must remain 'true' - to remove the default filtering input box and retain filtering abilities, please use
<
after which the sentence is left incomplete.
我试过:
var oTable = $('#sortable').dataTable({
'bPaginate':false,
'bInfo':false,
'bFilter': true // displays Search box, setting false removes filter ability all together
});
$('#Accumulate').click(function(){
oTable.fnFilter("Accumulate");
});
推荐答案
你也可以隐藏使用css类
You can also hide is using css class
<style type="text/css">
.dataTables_filter {
display: none;
}
</style>
这篇关于过滤dataTables.net而不包括过滤器框输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文