【datatable】Cannot read property 'style' of undefined问题解决
2017-08-30 09:58
901 查看
Uncaught TypeError: Cannot read property 'style' of undefined at Ha (jquery.dataTables.min.js?bust=v8:62) at ha (jquery.dataTables.min.js?bust=v8:48) at e (jquery.dataTables.min.js?bust=v8:93) at HTMLTableElement.<anonymous> (jquery.dataTables.min.js?bust=v8:93) at Function.each (jquery-1.9.1.min.js?bust=v8:3) at init.each (jquery-1.9.1.min.js?bust=v8:3) at init.m [as dataTable] (jquery.dataTables.min.js?bust=v8:82) at init.h.fn.DataTable (jquery.dataTables.min.js?bust=v8:167) at list:340 at Object.execCb (require.js:5)
遇到这个问题的时候一开始我以为是引入的js有问题,后来问了经理后原来是datatable的列的数量和表头列的数量没有对齐,表头我定义的列是这样的
可以看到这里我定义了5列,但是实际上datatable的columns中有7行要显示的列数,导致了这个问题。
归根结底是太粗心的问题。
相关文章推荐
- 引用react-native-scrollable-tab-view 之后Cannot read property 'style' of undefined问题
- 解决vue2.0路由 TypeError: Cannot read property 'matched' of undefined 的错误问题
- 关于easyui获取c#后台数据报错 Cannot read property 'length' of undefined的问题
- html离线存储之indexdDB 关于Cannot read property 'transaction' of undefined的问题(二)
- 关于js Uncaught TypeError: Cannot read property 'style' of null 问题
- 关于Uncaught TypeError: Cannot read property 'toLowerCase' of undefined的问题
- Cannot read property 'style' of null解决办法
- easyui:Cannot read property 'nodeName' of null问题的解决
- CANNOT READ PROPERTY ‘opera’ OF UNDEFINED解决方法
- jquery.dataTables.min.js:62 Uncaught TypeError: Cannot read property 'style' of undefined原因
- angular-cli启动问题——TypeError: Cannot read property 'newLine' of undefined
- 遇到问题-----mongodb-------Uncaught TypeError: Cannot read property 'value' of undefined
- easyui防止重复提交及进度条报错解决: Cannot read property 'onClose' of undefined
- 修改样式表时在某些浏览器(如360)下遇到Cannot read property 'style' of undefined错误的解决方案
- can't read property 'style' of undefined(DataTable)
- vuejs路由使用的问题Error in render function: "TypeError: Cannot read property 'matched' of undefined"
- js问题 Cannot read property 'messages' of undefined
- 解决dataTable 报错:cannot read property "style" of undefined
- js提示Cannot read property 'style' of undefined
- Uncaught TypeError: Cannot read property 'click' of null问题的解决