4
我一直在试图获得过滤后我的表的行数,但我甚至无法让它最初回应行计数。如何获得过滤的行数
我的表格通过HTML5呈现,并由PHP填充,所有工作都正常。
<table id="table_books" class="table datatable" data-searchplaceholder="Search books..." data-margindifference="70" >
<thead>
<tr>
<th style="width:30px;"><i class="fa fa-code" title="click"></i></th>
<th>Column1</th>
<th>Column2</th>
<th>Column3</th>
<th class="text-right hidden-xs" style="width:20%">Details</th>
</tr>
</thead>
<tbody>
<?php echo $contenthtml; ?>
</tbody>
</table>
我发现文档,说这个工作在1.9,但我得到一个无效的功能
$(document).ready(function() {
var btable = $('#table_books').DataTable();
var b_table_count = btable._('tr', {"filter":"applied"});
console.log(b_table_count);
});