【问题标题】:Datatables pagination数据表分页
【发布时间】:2013-10-11 09:29:32
【问题描述】:

我有这个代码:

$('#ldap-users, #audit-users').dataTable({
    "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
    "bInfo": false,
    "bProcessing": true,
    "bPaginate"  : true,
    "sPaginationType": "bootstrap",
    'aaSorting': [[1, "desc" ]],
});

我收到了这个错误:

Uncaught TypeError: Cannot read property '_iDisplayStart' of null

当我点击分页按钮时

【问题讨论】:

    标签: javascript jquery jquery-plugins datatables


    【解决方案1】:

    这是由于

    "sPaginationType": "bootstrap",
    

    删除/评论该行,您就可以了。猜你需要 nessecary 插件,见 -> http://datatables.net/plug-ins/pagination 上面写着:

    请注意,此插件使用 fnPagingInfo API 插件方法 获取寻呼信息

    该插件的源代码如下所示。

    【讨论】:

    • 站在我这边。所选页面未标记为选中。评论提到的行没有帮助
    【解决方案2】:

    最后一个条目(aaSorting)之后的 , 是错误的。删除它,然后重试。

    【讨论】:

    • 我删除它但我仍然收到Uncaught TypeError: Cannot read property '_iDisplayStart' of null
    猜你喜欢
    • 2019-03-18
    • 2011-04-04
    • 2020-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-11
    • 2016-07-10
    相关资源
    最近更新 更多