zTree Cannot read property 'init' of undefined的一种解决方式
来源:互联网 发布:汇丰银行 软件 招聘 编辑:程序博客网 时间:2024/06/15 01:12
今天在用zTree显示列表的时候遇到了一个问题,问题描述如下:Uncaught TypeError: Cannot read property 'init' of undefined at HTMLDocument.<anonymous>,而且是在jquery库中的提示,网上查了一下,大致意思是说和jQuery的冲突导致,自己写好的例子单独可以运行,一旦用<jsp:include >包含到目的页面中就出错,找了半天,发现原来是jquery插件引用了两次导致的,因为目的页面include了许多jsp文件,这些jsp文件中也引用了jquery-3.1.0.min.js,其实只需要在目的页面中引用一次就够了,子页面jsp中的相关引用都去掉,问题就解决了。有些插件在引用多次jquery不会出问题,但有些就不行。不过引起这个报错的原因估计很多,这只是我遇到的一种情况,及时记录下来希望能帮助大家。
1 0
- zTree Cannot read property 'init' of undefined的一种解决方式
- SpringMVC结合Sitemesh和ztree出现的Cannot read property 'init' of undefined
- ExtJS错误解决 Cannot read property 'on' of undefined
- 解决jquery报错cannot read property 'length' of undefined
- 解决antd Cannot read property 'validate' of undefined
- 解决dataTable 报错:cannot read property "style" of undefined
- "TypeError: Cannot read property 'undefined' of undefined"
- [jQuery]Cannot read property ‘msie’ of undefined错误的解决方法
- [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法
- [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法
- [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法
- 浏览器cannot read property 'msie' of undefined的解决方法
- [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法
- [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法
- [JQUERY] CANNOT READ PROPERTY ‘MSIE’ OF UNDEFINED错误的解决方法
- 浏览器cannot read property 'msie' of undefined的解决方法
- Cannot read property 'autoCreated' of undefined
- TypeError: Cannot read property 'parentNode' of undefined
- MySQL常用数据类型
- Vue 2.0初学后个人总结及分享
- heredoc和nowdoc
- Docker:入门基础
- final关键字解析
- zTree Cannot read property 'init' of undefined的一种解决方式
- C# 在PDF中创建和填充域
- boost条件变量使用
- LeetCode 27. Remove Element
- MySQL数据约束
- NProgress.js全站进度条插件 中文API
- Android:使用EventBus
- iOS开发CGRectGetMidX. CGRectGetMidY.CGRectGetMinY. CGRectGetMaxY. CGRectGetMinX. CGRectGetMaxX的使用
- Vuejs学习系列(二十三)-- 条件语句(一)