0
「DataTables warning:table id = dataTables-example-請求第1行未知參數'0'。」第1行請求未知參數'0'
我知道google上有很多類似的答案,但其中大多數都使用JSON,我沒有。我知道參數'0'是指事件ID,任何人都可以啓發我在哪裏改變?
我有一個名爲「TrialEvent」的類,名爲「EventRetrieveServlet」和Session Bean的servlet。
以下是我的jsp中的代碼。
<form method="get" action="EventRetrieveServlet">
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover"
id="dataTables-example">
<thead>
<tr>
<th>Event Ref.</th>
<th>Image</th>
<th>Date</th>
<th>Start</th>
<th>End</th>
<th>Target Percentage (%)</th>
<th>View Coordinate</th>
</tr>
</thead>
<tbody>
<c:forEach var="rEvent" items="${eventList}" varStatus="i">
<tr>
<td>${rEvent.getIdtrialevent()}</td>
<td><img
src='displayImage?image=${rEvent.getTrialImage().getImageURL()}'
height=80px, width=100px></td>
<td>${rEvent.getDate()}</td>
<td>${rEvent.getStart()}</td>
<td>${rEvent.getEnd()}</td>
<td>${rEvent.getTargetperc()}</td>
<td><a href="javascript:void(0)"
onclick="ShowNewPage(${rEvent.getAreacoords().getCoordsID()})"><img
src="assets/img/view.png" height=20px width=20px></a></td>
<tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
</form>
這裏是我的javascript
<!-- Page-Level Demo Scripts - Tables - Use for reference -->
<script>
$(document).ready(function() {
$('#dataTables-example').dataTable(
);
});
</script>
我試圖讓分頁的工作,但我懷疑這錯誤是防止分頁無法正常工作。
OMGGGGGGGGGGGGG很感謝你!!!!!! –