Firebug 中的数据表警告

发布于 2024-11-28 21:08:33 字数 855 浏览 1 评论 0原文

所以我有一个由用户输入填充的数据表。当我进入屏幕时(在提交任何内容之前),我不会在萤火虫中发出任何警告。当我在表中输入一些内容并提交后。我自动返回到同一页面,只有表格中有我提交的信息。此时我遇到了错误。看起来

DataTables warning (table id = 'table'): Unexpected number of TD elements. Expected 5
and got 6. DataTables does not support rowspan / colspan in the table body, and there 
must be one cell for each row/column combination.

很明显,但我的桌子上没有 rowspan 或 colspan。所以我不知道问题是什么。另外,这是我对数据表的设置:

 var table1 = {};
 table1 = O_LANGUAGE = {sEmptyTable: "There is nothing here."};

        $(document).ready(function() {
      var $table= $("#table");
    $table.dataTable({
      "aaSorting": [ [0,'desc'] ], "oLanguage" : bsFaReq.O_LANGUAGE, "bLengthChange": false, "bFilter": false, "bAutoWidth": false, "bInfo": false, "bPaginate": false
      });

好的,所以它运行良好,但在修复此警告之前我无法将其发布,感谢任何帮助,提前谢谢您。

So I have a datatable that is being populated by user inputs. When I enter the screen (before I submit anything) I dont throw any warnings in firebug. After I enter something into the table and submit. I automatically get returned to the same page, only the table has my submitted information in it. At this point is when I am getting the error. Here it is:

DataTables warning (table id = 'table'): Unexpected number of TD elements. Expected 5
and got 6. DataTables does not support rowspan / colspan in the table body, and there 
must be one cell for each row/column combination.

Seems obvious, but I dont have rowspan or colspan on my table. So I dont know what the problem is. Also, here is my setup for the datatable:

 var table1 = {};
 table1 = O_LANGUAGE = {sEmptyTable: "There is nothing here."};

        $(document).ready(function() {
      var $table= $("#table");
    $table.dataTable({
      "aaSorting": [ [0,'desc'] ], "oLanguage" : bsFaReq.O_LANGUAGE, "bLengthChange": false, "bFilter": false, "bAutoWidth": false, "bInfo": false, "bPaginate": false
      });

OKay, so it runs fine, but I cant put it out until I get this warning fixed, any help is appreciated, thank you in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧情勿念 2024-12-05 21:08:33

这是因为您的表中有 5 列,但发送的数据为 6 列。

It's because the there are 5 columns in Your table but data is sent for 6.

2024-12-05 21:08:33

我认为你必须调试第一个警告,即“预期 5 个,得到 6 个”,这意味着你试图添加 6 个 td,而上面的行只有 5 个。

I think you have to debug the first warning which is "Expected 5 and got 6" which means you are trying to add 6 td's while the rows above were 5 only.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文