p>
"order": [[6, "asc"]],
Instead of
"order": [[0, "asc"]],
reason, only 3 columns, I chose column 6 to sort…
so there’s a sense that it’s out of bounds, so the error is
<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>
p>
div>
Read More:
- Datatable plug-in error: uncaught typeerror: cannot read property ‘style’ of undefined
- [_ Note] Vue.js reported an error: Cannot read property’validate’ of undefined”
- Uncaught type error: cannot read property ‘MSIE’ of undefined
- Cannot read property ‘catch‘ of undefined“
- Cannot read property ‘properties’ of undefined
- Cannot read property ‘i18n‘ of undefined
- TypeError: Cannot read property ‘username‘ of undefined
- Cannot read property ‘substring’ of undefined in Vue
- TypeError: Cannot read property thisCompilation of undefined
- Vue: cannot read property ‘substring’ of undefined“
- Applet component properties error cannot read property ‘name’ of undefined
- Vue error resolution: TypeError: Cannot read property’_t’ of undefined”
- Vue error resolution: typeerror: cannot read property ‘_ t’ of undefined”
- [Solved] Vue Error: TypeError: Cannot read property ‘end‘ of undefined
- [Solved] Syntax Error: TypeError: Cannot read property ‘parseComponent‘ of undefined
- Error in created hook: “typeerror: cannot read property ‘cm’ of undefined”
- Vue error in render: “typeerror: cannot read property ‘name’ of undefined”
- Vue uses this. $refs. Subcomponent Ref. method to report an error: cannot read property ‘resetfields’ of undefined problem
- [TS] solutions to line 0: parsing error: cannot read property ‘map’ of undefined
- Error reported by wechat applet: cannot read property ‘forceupdate’ of undefined