采用any()方法
检查表格的数据是否为空
var table = $('#example').DataTable(); if ( ! table.data().any() ) { alert( 'Empty table' ); }
API链接:http://datatables.club/reference/api/any().html
采用any()方法
检查表格的数据是否为空
var table = $('#example').DataTable(); if ( ! table.data().any() ) { alert( 'Empty table' ); }
API链接:http://datatables.club/reference/api/any().html
转载于:https://www.cnblogs.com/yang-xiansen/p/10082094.html