1

我想根据在文本字段中的写入过滤第三列字段。但它不起作用。而且我还想在表头之后对文本字段进行列过滤。

在此处输入图像描述

JS

<script type="text/javascript" src="assets/admin/js/jquery.validate.js"></script>
<script type="text/javascript" src="assets/admin/js/jquery.dataTables.js"></script>
<script type="text/javascript" src="assets/admin/js/jquery.datatables.columnfilter.js"></script>

JS

<script>
$(document).ready(function() {

$('#example').dataTable( {

"bProcessing": true,

"bFilter" : true,

//"bServerSide": true,

"aaSorting": [[0,'desc']],

"aoColumns":[{ "bVisible":false, "bSearchable": false, "bSortable": false},

{ "bVisible":true,"bSearchable": true, "bSortable": true , "mRender": rendercheckbox},

{ "bVisible":true,"bSearchable": true, "bSortable": true , "mRender": renderucwords},

{ "bVisible":true,"bSearchable": true, "bSortable": false , "mRender": renderattachment, "sClass": "center"},

{ "bVisible":true, "bSearchable": false, "bSortable": false ,"mRender": renderaction , "sClass": "center"}],

"bJQueryUI": true,

"sPaginationType": "full_numbers",

"sScrollX": "100%",

"sScrollXInner": "100%",

"bScrollCollapse": true,

"sAjaxSource":"<?php echo site_url('admins/promotion/getdata');?>"

} ).

columnFilter({

sPlaceHolder: "head:before",

bFilter: false,

aoColumns: [  null,

null,

{ type: "text",                         

},

null,

null

] 

});

});

</script>
4

1 回答 1

1

利用

$('#example').DataTable( {});

代替

$('#example').dataTable( {});

还要检查控制台中的任何 javascript 错误

于 2015-05-16T12:50:12.263 回答