【发布时间】:2016-07-25 07:20:07
【问题描述】:
我为一页添加了数据表,但它不应该得到数据表格式
<script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script>
<table class="example3" id="example1">
<tr>
<td></td>
<td></td>
</tr>
</table>
<script>
$(document).ready(function() {
$('.example3').DataTable();
alert('1234567890');
} );
</script>
我遇到了这样的错误,我检查了 class 和 id class 它们都来自数据库。如果我删除数据,我也不会得到值。
TypeError: c 未定义
...ldren("th, td").each(function(a,b){var c=o.aoColumns[a];if(c.mData===a){var d=s(...
请让我知道错误在哪里,因为其他项目中使用的代码相同。
【问题讨论】:
-
我们需要有关您的代码的更多信息,因为您的代码似乎工作得很好:jsfiddle.net/zdrpd2fs
-
尝试添加带有行标题的 标记
标签: php jquery codeigniter datatables