TypeError:无效' in'操作数a

时间:2015-06-18 10:16:27

标签: javascript jquery html css twitter-bootstrap

我无法使用DataTables。显示页面后,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 个答案:

答案 0 :(得分:2)

像Sirko提到的那样,更新为数据表1.10.9&amp;这解决了这个问题。