Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript js数据表不工作_Javascript_Jquery_Datatables - Fatal编程技术网

Javascript js数据表不工作

Javascript js数据表不工作,javascript,jquery,datatables,Javascript,Jquery,Datatables,我不知道我做错了什么。我的普通桌子是这样的: <table id="table_list_values"> <thead> <tr> <th> Seq </th> <th> Order

我不知道我做错了什么。我的普通桌子是这样的:

   <table id="table_list_values">
        <thead>
            <tr>
                <th>
                    Seq
                </th>
                <th>
                   Order
                </th>
                <th>
                    Code
                </th>
                <th>
                    Description
                </th>
                <th>
                    Label Code
                </th>
            </tr>
        </thead>
    </table>
“bLengthChange”

注意:它们都包装在
$(document).ready(function(){….})

我有另一个表,只需添加
$(“#Mytable”).dataTable()即可正常工作


我做错了什么?如果有其他需要,请告诉我。

如果要分页,需要将其设置为“真”

 $('#ListValues').dataTable( {
    "bPaginate": true
  } );

html中的表id是“table_list_values”,datatable函数正在查找#ListValues


每当您看到一个看起来奇怪的datatable,即没有分页、列关闭、没有应用jquery ui样式,很可能是选择器或表html

对不起,我已经将其设置为true。这是一个错误。我已经更新了我的postYour table id,您正在调用#ListValues。。。确保您有正确的ID
  $('#ListValues').dataTable( {
    "bLengthChange": false
  } );
 $('#ListValues').dataTable( {
    "bPaginate": true
  } );