我在我的项目中使用 JQUERY DATATABLES。我已添加所有参考并遵循文档中指定的所有步骤。但我看不到分页的。我可以看到表格排序,但我可以看到分页数。我觉得它选择了错误的 jquery 库。我怎么知道它指的是哪个 jQuery?
我的项目中有以下对数据表的引用。
<script src="~/Scripts/jquery.js"></script>
<script src="~/Scripts/jquery.dataTables.js"></script>
<link href="~/Content/jquery.dataTables.css" rel="stylesheet" />
我有下表数据
<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Tiger Nixon</td>
<td>System Architect</td>
<td>Edinburgh</td>
</tr>
<tr>
<td>Garrett Winters</td>
<td>Accountant</td>
<td>Tokyo</td>
</tr>
<tr>
<td>Ashton Cox</td>
<td>Junior Technical Author</td>
<td>San Francisco</td>
</tr>
<tr>
<td>Cedric Kelly</td>
<td>Senior Javascript Developer</td>
<td>Edinburgh</td>
</tr>
<tr>
<td>Airi Satou</td>
<td>Accountant</td>
<td>Tokyo</td>
</tr>
</tbody>
</table>
我在这里渲染数据表
<script type="text/javascript">
$(function () {
var localTable =$('#example').dataTable({
"bProcessing": true,
"iDisplayLength": 5,
"bPaginate": true,
"sPaginationType": "full_numbers"
});
});
</script>