gpt4 book ai didi

jquery - ie8 中 ntablewrapper 为 null 或不是对象错误

转载 作者:行者123 更新时间:2023-12-01 05:53:17 25 4
gpt4 key购买 nike

我是 jquery 数据表的新手,我正在尝试解决 ie8 中由于数据表中的 fn.destroy 导致的错误。

它在 Firefox 中工作正常,但在 ie8 中使用 oTable.fnDestroy 时会抛出错误“ntablewrapper”为 null 或不是 jquery.datatable.js 行号 5410 中的对象。

我使用的是 jquery.datatable.js 版本 1.9.4。

如果我删除 oTable.fnDestroy,则不会出现错误,但数据表不会重新初始化,并且页面上不会显示任何内容。

这是我的代码。

var oTable = $('#sample_editable_1').dataTable();
oTable.fnDestroy();
oTable = $('#sample_editable_1').dataTable( {
"bProcessing": true,
"bServerSide": true,
"bLengthChange": false,
"fnDrawCallback": function( oSettings ) {},
"fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
oSettings.jqXHR = $.ajax( {
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aoData,
"success": function(data){}
}
});

有什么办法可以解决这个问题或者有什么替代方案吗?

最佳答案

虽然回复晚了希望对大家有帮助。

将小 dataTable() 更改为 DataataTable()

关于jquery - ie8 中 ntablewrapper 为 null 或不是对象错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18973774/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com