【问题标题】:How to show “Showing 1 of N Entries” with the dataTables.js library?如何使用 dataTables.js 库显示“Showing 1 of N Entries”?
【发布时间】:2020-11-26 04:59:52
【问题描述】:
var table = $("#user_table").DataTable({
    'sDom': '<"row-drop"<"col-sm-12 row"lr>><"row"t><"row-pager"<"col-sm-12 col-md-5"i><"col-sm-12"p>>',
    "ordering": true,
    "order": [[ 3, "asc" ]],
    "paging": true,
    "searching": true,
    "info": true,
    "autoWidth": false,
    "stateSave": true,
    "orderCellsTop": true,
    "fixedHeader": true,

这是我的代码。您可以看到以下信息:该值为 true,但 div 也已禁用。有没有人可以帮助我。我想只显示数据表中可见的条目总数。

【问题讨论】:

    标签: javascript html jquery datatable datatables


    【解决方案1】:

    尝试将 bPaginate 设置为 false。您的代码适用于 1.10+ 版本,而 bPaginate 是您用于 1.9 版本的代码。

    var table = $("#user_table").DataTable({
        'sDom': '<"row-drop"<"col-sm-12 row"lr>><"row"t><"row-pager"<"col-sm-12 col-md-5"i><"col-sm-12"p>>',
        "ordering": true,
        "order": [[ 3, "asc" ]],
        "bPaginate": false,
        "searching": true,
        "info": true,
        "autoWidth": false,
        "stateSave": true,
        "orderCellsTop": true,
        "fixedHeader": true,
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-10-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-31
      • 2011-06-04
      • 2013-11-01
      • 2011-04-15
      相关资源
      最近更新 更多