我有一個問題,我試圖做一個表使用數據表...我已經從datatable.net下載.. 但數據網格不顯示.. 。只是表頭(thead)... 哪裏是我的錯?製作數據表的麻煩,初始化後<tbody>仍然是空的
<table cellpadding="0" cellspacing="0" border="0" class="display" id="datalist">
<thead>
<tr>
<th>Line </th>
<th>Model </th>
<th>Serial </th>
<th>NIK </th>
</tr>
</thead>
<tbody> </tbody>
</table>
<script>
$(document).ready(function(){
var oTable;
oTable = $("#datalist").dataTable({
"bRetrieve" : true,
"bServerSide": true,
"bProcessing": true,
"sAjaxSource": 'showlist.php',
"aaSorting" : [[1,"desc"]],
"aoColumns" : [
/*Line*/ null,
/*Model*/ null,
/*Serial*/null,
/*NIK*/ null
]
});
});
</script>
在螢火沒有顯示錯誤,並在後的反應顯示結果:
{"aaData":[
["FA 04","KW-XC555UD","123X0098","12345"],
["FA 05","KD-R435UHD","113X0057","12345"],
["FA 11","kd-r411uhd","115x0021","12345"],
["FA 04","kw-xc406hund","105x1101","12345"],
]}
請代碼!....你不是新手,你知道,我們不能說「哦,你的錯在那裏!」,當我們什麼都不能指向時...... – Reigel 2010-07-06 07:09:37
對不起,我遲到了發佈我的代碼.. – klox 2010-07-06 07:13:16
你使用這個嗎?http://datatables.net/examples/server_side/server_side.html如果是的話,請嘗試檢查螢火蟲如果'showlist.php '返回的東西...... – Reigel 2010-07-06 07:17:00