Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/70.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 TypeError:无效';在';操作数a_Javascript_Jquery_Html_Css_Twitter Bootstrap - Fatal编程技术网

Javascript TypeError:无效';在';操作数a

Javascript TypeError:无效';在';操作数a,javascript,jquery,html,css,twitter-bootstrap,Javascript,Jquery,Html,Css,Twitter Bootstrap,我无法让数据表工作。显示页面后,Firefox开发工具显示以下错误:TypeError:invalid'in'操作数a 有人知道这个问题的解决办法吗?这是我的代码: <!-- Bootstrap --> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/jquery.dataTables.min.css" rel="stylesheet"> <!-- <link

我无法让数据表工作。显示页面后,Firefox开发工具显示以下错误:TypeError:invalid'in'操作数a

有人知道这个问题的解决办法吗?这是我的代码:

<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/jquery.dataTables.min.css" rel="stylesheet">
<!-- <link href="css/dataTables.bootstrap.css" rel="stylesheet"> -->

</head>
<body>
<div class="container">
    <div class="table-responsive">
        <table id="table_id" class="display">
            <thead>
                <tr>
                    <th>Column 1</th>
                    <th>Column 2</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>Row 1 Data 1</td>
                    <td>Row 1 Data 2</td>
                </tr>
                <tr>
                    <td>Row 2 Data 1</td>
                    <td>Row 2 Data 2</td>
                </tr>
            </tbody>
        </table>
    </div>
</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script>
    $(document).ready( function () {
        $('#table_id').DataTable();
    } );
</script>
</body>
</html>

第1栏
第2栏
第1行数据1
第1行数据2
第2行数据1
第2行数据2
$(文档).ready(函数(){
$('#table_id')。DataTable();
} );

正如Sirko所提到的,更新到datatables 1.10.9&这解决了问题。

注意:刚才出现了相同的错误,但使用datatables 1.10.8和jQuery v1.11.3解决了问题。在我有datatables 1.10.3之前