JS prompt cannot read property ‘style’ of undefined

"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>


Read More: