【发布时间】:2016-01-26 21:04:02
【问题描述】:
我的问题是参数 0 行 0 列 0 datables.net/tn/4 的数据错误。我正在使用 ajax 来检索我的数据并填充表格。
这里是ajax
$.ajax({
url: 'DAL/WebService1.asmx/FabGuide',
method: 'post',
dataType: 'json',
success: function (data) {
console.log(data);
$("#datatable").dataTable({
data: data,
columns: [
{ 'data:': 'accountCode' },
{ 'data:': 'accountValue' },
{ 'data:': 'description' },
{ 'data:': 'manufacturer' },
]
});
}
});
这是桌子
<table id="datatable">
<thead>
<tr>
<th>accountCode</th>
<th>accountValue</th>
<th>description</th>
<th>manufacturer</th>
</tr>
</thead>
</table>
也许我只是看了很久 谢谢
【问题讨论】:
-
{ 'data:': 'manufacturer' },//<-- remove comma后面多了一个逗号。这可能是问题吗? -
不,我也这么认为
标签: jquery datatables datatables-1.10