jquery dataTable 导入js后 页面报length of undefined
2017-05-09 14:38
591 查看
今天在使用dataTable遇见各种问题。先是导错js。然后各种报错。后来又各种调试。后来直接使用官方提供的js。但是却报了一个Cannot read property 'length' of undefined
后来搜了一下。是因为使用了ajax返回数据有问题。
返回数据格式为:
{
sEcho:1 //当前页
iTotalRecords:2 //总数
iTotalDisplayRecords:3 //筛选后总数
aaData: //返回的集合
{
....list...
}
}
后来搜了一下。是因为使用了ajax返回数据有问题。
返回数据格式为:
{
sEcho:1 //当前页
iTotalRecords:2 //总数
iTotalDisplayRecords:3 //筛选后总数
aaData: //返回的集合
{
....list...
}
}
相关文章推荐
- 关于js页面:cannot read property 'call' of undefined
- myeclipse对导入的jquery.jsSyntax error on token "undefined", invalid FormalParameter
- utf-8页面导入gb2312的js如何不出现乱码
- js中undefined,null和typeof运算符
- aes.js:77 Uncaught TypeError: Cannot read property 'extend' of undefined(…)
- 导入doc.js文件,其中headerTpl,footerTpl等一部分内容作为公用的模板,让各个页面都有同样的效果
- 加速页面导入js的加载进程
- Cannot read property 'name' of undefined @ injectScripts.min.js:1
- JS: Cannot read property 'innerHTML' of undefined错误
- js的form(load报错jquery.easyui.min.js:2837 Uncaught TypeError: Cannot read property 'tip' of undefined
- html导入js页面遇到的编码问题
- 字符串字符JS:1.8,字符串(string)对象(length,indexOf(),lastIndexOf(),replace(),match(),toUpperCase(),toLowerCas
- 在页面引入js文件冲突问题(注意js文件导入的顺序)
- Uncaught TypeError: Cannot read property 'length' of undefined
- jstypeof方法判断undefined类型
- 页面导入了多个css、js,include了多个页面后,draggable is not a function
- 在jsp页面导入要使用的js文件
- js中undefined,null和typeof运算符
- 在jsp页面导入jquery多个js文件
- JsBridge "Uncaught TypeError: Cannot call method 'callHandler' of undefined", source