【问题标题】:How to add data table length ,pagination and html button into the single row at the top and bottom at right side of the page如何将数据表长度、分页和html按钮添加到页面右侧顶部和底部的单行中
【发布时间】:2018-05-21 06:15:32
【问题描述】:

我正在尝试使用数据表在表的顶部和底部添加长度分页和 Html 按钮,但无法将其对齐到单行中。 谁能帮我将数据表控件对齐到单行?

必需:希望在表头之前和表尾之后显示页面信息。

提前致谢。

【问题讨论】:

  • 添加您的代码或创建小提琴。
  • 请提供您的问题的相关细节,至少添加一个代码sn-p。

标签: jquery datatables


【解决方案1】:

试试这个代码,

var table = $('#example').DataTable();
var info = table.page.info();

$('#tableInfo').html(
    'Currently showing page '+(info.page+1)+' of '+info.pages+' pages.'
);

希望这会对您有所帮助。 欲了解更多详情,请访问,

page.info()

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-04-03
    • 1970-01-01
    • 1970-01-01
    • 2020-10-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多