【问题标题】:unable to clear jquery DataTable无法清除 jquery DataTable
【发布时间】:2013-06-15 06:18:38
【问题描述】:

我有一个按钮,单击它时我想清除数据表并重新加载新数据。但是当我点击按钮时,数据表并没有被清除。

我已经编写了下面的代码,但可能浏览器没有获取方法 dataTable()

我收到此错误:TypeError: $(...).dataTable is not a function

function Loaded(result) {
$(document).ready(function () {
     $("#myDataTable").dataTable().fnClearTable();
  });
}

【问题讨论】:

  • dataTables 是一个 jQuery 插件。是否加载了 dataTable 脚本?
  • 哦,是的。顺便说一句,问题解决了。我在页面中添加了两个 jquery.js 文件的引用。解决方案:如果您遇到类似问题,请先检查源文件中包含多少 jquery 文件。哈哈!!!管理员请关闭问题。

标签: jquery html datatables


【解决方案1】:

dataTables 是一个 jQuery 插件。是否加载了 dataTable 脚本?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-27
    • 2021-01-23
    • 1970-01-01
    • 2018-10-14
    相关资源
    最近更新 更多