如果列不以javascript中的特定字符串开头,如何显示数据 [英] How to show the data if the column does not starts with a specific string in javascript

查看:66
本文介绍了如果列不以javascript中的特定字符串开头,如何显示数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个有7列的数据表。它不应该在数据表中显示以列索引0的ABC文本开头的数据。通过以下解决方案但是没有工作请帮助。



我尝试过:



$(文件).ready(function(){

$('#ttable ')。DataTable({

'order':[[0,'asc']],

'pageLength':10

} );

oTable = $('#ttable')。dataTable();

oTable.fnFilter('ABC',0,true,false);

});

Hi,
I have a datatable that has 7 columns. It should not display the data in datatable that starts with "ABC" text for column index 0.Tried the below solution but didn't work Please help.

What I have tried:

$(document).ready( function () {
$('#ttable').DataTable( {
'order': [[ 0, 'asc' ]],
'pageLength': 10
} );
oTable = $('#ttable').dataTable();
oTable.fnFilter('ABC', 0, true, false);
} );

推荐答案

(document).ready(function(){
(document).ready( function () {


('#ttable')。DataTable({

'order':[[0,'asc']],

'pageLength':10

});

oTable =
('#ttable').DataTable( {
'order': [[ 0, 'asc' ]],
'pageLength': 10
} );
oTable =


('#ttable')。dataTable();

oTable.fnFilter( 'ABC',0,true,false);

});
('#ttable').dataTable();
oTable.fnFilter('ABC', 0, true, false);
} );


这篇关于如果列不以javascript中的特定字符串开头,如何显示数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆