我目前正致力于客户端分页,我陷入其中。所以我正在寻求帮助 下面是我在jsp中的代码:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<link href="//cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css" rel="stylesheet">
<script src="//cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
我的表是:
<table id="logTable" class="table table-bordered">
<thead>
<tr>
<th>
Transaction Log
</th>
<th>
Updated On
</th>
<th>
Updated By
</th>
</tr>
</thead>
<tbody>
<c:if test="${fn:length(transactionLogList) gt 0}">
<c:forEach var="tLog" items="${transactionLogList}">
<tr>
<th>
${tLog.remarks}
</th>
<th>
${tLog.created }
</th>
<th>${tLog.username}</th>
</tr>
</c:forEach>
</c:if>
</tbody>
</table>
我的jquery数据表函数是
$(document).ready(function(){
$('#logTable').dataTable();
});
我得到了以下错误:
Uncaught TypeError: $(...).DataTable is not a function
at HTMLDocument.<anonymous>
at j (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at Function.ready (jquery.min.js:2)
at HTMLDocument.J (jquery.min.js:2)
如何摆脱此错误