且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

jQuery数据表问题

更新时间:2022-11-02 18:41:06

我发布了这个答案来记录一些事情以备将来参考,希望能帮助别人下线。



使用页面(一点RTFM):



为了使DataTables能够正常运行,为了
目标表的HTML必须以一个良好的形式,以
'thead'和

在我的情况下,< thead> < tbody> 部分缺少。糟糕。


When using the jQuery datatables plugin, why am I getting this error?

"k is undefined" -style typeof e.saved_aaSorting=="undefined")

I posted this answer to document something for future reference for myself, I hope it will help someone else on down the line.

From the usage page (a little RTFM):

In order for DataTables to be able to function correctly, the HTML for the target table must be laid out in a well formed manner with the 'thead' and 'tbody' sections declared.

In my case, the <thead> and <tbody> sections were missing. Oops.