更新时间:2021-07-08 15:37:10
通常,出现此错误的原因有两个:
Usually this error occurs for two reasons:
td
元素数与表头中的th
元素数不同.td
elements in the table body differs from number of th
elements in the table header.但是您的HTML代码似乎具有正确的列数,请参见此示例.
However your HTML code seems to have correct number of columns, see this example.
请参见 jQuery数据表:常见的JavaScript控制台错误-TypeError:无法读取未定义的属性'mData',以获取更多信息.
See jQuery DataTables: Common JavaScript console errors - TypeError: Cannot read property ‘mData’ of undefined for more information.