返回顶部

ztree——Cannot read property 'init' of undefined解决方案

参考:https://blog.csdn.net/cl11992/article/details/85629142

  https://blog.csdn.net/leijia_xing/article/details/62422108?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relevant.none-task

 

我的情况:报错页面为add.jsp,里面抬头有句"<%@ include file="../../../common/m_declare.jsp"%>",这句会引入jquery.min.js。但我之前在main.jsp页面抬头也有这句,即已经引入过一次,所以进add.jsp页面时又会引入,这样就会报错了。

原因:重复引入jquery.min.js (这之前注意先看看ztree.js引入没有==,很致命)

解决:去掉add.jsp里的引入即可

posted @ 2020-03-10 17:06  前端-xyq  阅读(3665)  评论(0编辑  收藏  举报