我有以下代码:
<script type="text/javascript">
$(document).ready(function(){
$('#browseListings').DataTable({
"processing":"true",
"serverSide":"true",
"ajax":"http://localhost//htdocs/index.php/admin/ajaxbrowse"
});
});
</script>
<table border="0" cellpadding="2" cellspacing="1" class="datable_table display" id="browseListings">
<thead>
<tr>
<th>Company Name</th><th>Country</th><th>Listing Type</th> <th>Actions</th></tr>
</thead>
</table> 在页面加载时,它正确地给出了前10个条目,但是当我分页时,它只是挂在“正在处理”上。我知道它以与第一页相同的格式从控制台返回数据,所以我是不是遗漏了什么?从手册上看,你不需要设置栏目-它应该只是简单地工作??
发布于 2016-09-16 19:18:26
好的,这里的问题是绘图需要增加,我把它硬编码为1!我使用了自己的自定义服务器端脚本,并包含了draw,但没有将其设置为与入站匹配(尽管按照建议将其强制转换为int )。
https://stackoverflow.com/questions/39529554
复制相似问题