【问题标题】:ajax pagination using datatable plugin使用数据表插件的ajax分页
【发布时间】:2022-04-11 22:20:02
【问题描述】:

我正在尝试使用数据表插件进行 ajax 分页。它加载了第一组数据,但分页不起作用。 有人可以给我一个数据表ajax分页的好例子吗?

我还需要知道如何设置要显示的行数。

【问题讨论】:

  • 在这里发布您的代码。我需要您到目前为止尝试过的内容..

标签: php datatables jquery-pagination


【解决方案1】:

您需要创建一个 AJAX 端点(数据库将从这里填充表)。

以下 JSON 数据应来自数据表。

iTotalRecords – Number of total records in the table, before applying the filters.
iTotalDisplayRecords – Number of records returned after applying the filters.
sEcho – An un-altered copy of the sEcho sent from the client.
aaData – Array of data from the server. 

请在此处阅读: http://www.sitepoint.com/working-jquery-datatables/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多