js提示Cannot read property 'style' of undefined
来源:互联网 发布:大数据与网络安全论文 编辑:程序博客网 时间:2024/06/05 00:07
将
"order": [[6, "asc"]],改为
"order": [[0, "asc"]],
原因,只有3列,我选了第6列进行排序...
所以有一种越界的感觉,因此报错了
<div class="box-body"> <table class="table table-bordered table-striped" id="mytable" role="grid" aria-describedby="user" style="width: 100%;"> <thead> <tr> <th>名字</th> <th>年龄</th> <th>性别</th> </tr> </thead> </table></div>
<script> var table; $(function () { table = $('#mytable').DataTable({ "sScrollY": $(this).height() -280, "serverSide": true, "processing": true, "paging": true, "lengthChange": false, "searching": false, "ordering": false, "info": true, "autoWidth": true, "order": [[0, "asc"]],//按照第几列排序 "pageLength": 10, "bLengthChange": true, "oLanguage": lang, "ajax": { "url": "${CONTEXT_PATH}/admin/essay/voteList", "type": "POST", "dataSrc": "data", "data": function (d) { d.extra_search = $("#form").serialize(); } }, "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 5 ] }], "columns": [ {"data": "name"}, {"data": "age"}, {"data": "sex"} ] }); });</script>
阅读全文
0 0
- js提示Cannot read property 'style' of undefined
- jquery.dataTables.min.js:62 Uncaught TypeError: Cannot read property 'style' of undefined原因
- 解决dataTable 报错:cannot read property "style" of undefined
- 【datatable】Cannot read property 'style' of undefined问题解决
- dataTables Uncaught TypeError: Cannot read property 'style' of undefined
- JQUERY提示Cannot read property 'length' of undefined
- vuejs2.0 提示Cannot read property 'push' of undefined
- cocos2d-js-----Uncaught TypeError: Cannot read property 'style' of null
- "TypeError: Cannot read property 'undefined' of undefined"
- JS: Cannot read property 'innerHTML' of undefined错误
- 关于js页面:cannot read property 'call' of undefined
- Cannot read property 'name' of undefined @ injectScripts.min.js:1
- background.js Uncaught TypeError: Cannot read property 'xxx' of undefined
- TS/JS错误:TypeError: Cannot read property 'prototype' of undefined
- vue.js中报错: TypeError: Cannot read property 'indexOf' of undefined
- js提示Uncaught TypeError: Cannot read property 'options' of null
- Cannot read property 'autoCreated' of undefined
- TypeError: Cannot read property 'parentNode' of undefined
- pickle——保存python中数据结构的模块
- 鑫飞智显智能魔镜,开启家居“童话”
- LRU(least recently used)内存淘汰旧数据
- 树莓派3 温控风扇的安装
- 无需form标签的文件上传
- js提示Cannot read property 'style' of undefined
- Metasploit笔记
- mysql常见面试题
- 数据库监测怎样在客户发觉之前解决问题
- 将博客搬至CSDN
- 501. Find Mode in Binary Search Tree
- MVVC 原理
- MyBatis的架构设计以及实例分析
- Fusion Access发放虚拟机的几个步骤