var table = $('.table-sort').DataTable();
var tableSettings = table.fnSettings();
// 获取页码值
alert(tableSettings._iDisplayStart);
//获取页面分割长度
alert(tableSettings._iDisplayLength);
执行后,发现table.fnSettings()报错:Uncaught TypeError: table.fnSettings is not a function
解决方法:
将var table = $('.table-sort').DataTable();变更为var table = $('.table-sort').dataTable();