Jquery数据表集成错误?

我正在将jquery数据表集成到我的项目中。 当调用service时,会抛出一些错误跟踪错误

无法读取未定义的属性’assorting’

这是代码

时间线

  

   $(document).ready( function() { $('#example').dataTable( { "bProcessing": true, "bServerSide": true, "sAjaxSource": "URL", "fnServerData": function ( sSource, aoData, fnCallback, oSettings ) { console.log(aoData); oSettings.jqXHR = $.ajax( { "dataType": 'json', "type": "POST", "url": sSource, "data": aoData, "success": fnCallback } ); } } ); } );  

这是服务器的Sample out put

{“some”:“yyy”,“open”:null,“program”:1,“more”:“must”,“comment”:000}

你的桌子需要一个THEAD部分和一个TBODY部分:

 
First ColumnSecond Column etc.

注意:同样重要的是你的THEAD不能为空,因为dataTable要求你指定由

指定的预期数据的列数。

除了上面的@bumptious之外,重要的是要注意THEAD部分不能为空; dataTables需要

column1

内容作为表中的占位符。

使用“order”子句并引用不存在的字段/列时,也会发生此错误。

谢谢,

表应该有&section。

确保表的数据列数td等于标题列th。