出现“无法读取未定义的属性‘ext’"之类的错误;在 Jquery 数据表中 [英] Getting error like "Cannot read property 'ext' of undefined" in Jquery Datatable

查看:17
本文介绍了出现“无法读取未定义的属性‘ext’"之类的错误;在 Jquery 数据表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 jquery 数据表中显示打印按钮.但是出现无法读取未定义的属性‘ext’"之类的错误.

I am trying to show print button in jquery data table. But getting error like "Cannot read property 'ext' of undefined.

我使用的脚本是,

script_tag('www/js/data-tables/buttons.html5.js').
script_tag('www/js/data-tables/buttons.print.js').
script_tag('www/js/data-tables/dataTables.buttons.js').
script_tag('www/js/data-tables/jquery.dataTables.js')

和 css ,

link_tag('www/js/data-tables/buttons.dataTables.css')

推荐答案

以相反的顺序声明脚本:

Declare the scripts in the reverse order :

script_tag('www/js/data-tables/jquery.dataTables.js')
script_tag('www/js/data-tables/dataTables.buttons.js').
script_tag('www/js/data-tables/buttons.html5.js').
script_tag('www/js/data-tables/buttons.print.js').

dataTables 扩展想要访问 $.fn.DataTable.ext,如果 jquery.dataTables.js 不存在,则不存在包括.

dataTables extensions wants to access $.fn.DataTable.ext, which not is present if jquery.dataTables.js not yet is included.

这篇关于出现“无法读取未定义的属性‘ext’"之类的错误;在 Jquery 数据表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆