0
下面是我使用JQuery數據表的問題摘要。數據表不顯示分頁
a。我的JSP頁面包含以下內容:
<script type="text/javascript" src="../include/jquery.dataTables.js"></script>
<script>
$(document).ready(function() {
$('#snapTable').dataTable({
"iDisplayLength": 5,
"bPaginate": true
});
})
:
function checkSnapStatus() {
var url = "...."; // some JSP servlet return HTML table id = 'snapTable'. HTML has a div called progress_bar
$.get(url, function(xml) {
$('#statuscontent').html(xml); // Put the return HTML into div id='statuscontent' on the body element
var object = $('div.progress_bar'); // Get the div id=progress_bar elements =
$.each(object, function() {
//process some stuff
});
});
}
b。 checkSnapStatus函數從body.onload調用。 $ .get函數後,顯示記錄(大量),但沒有分頁。我沒有看到上一個或下一個按鈕。
嘗試var url =「....」; –
Sori ..我在var url後面有一個分號。 – yapkm01