- 链接地址:https://blog.csdn.net/CSDN_fzs/article/details/106543522
- 链接标题:【JavaScript】解决$ is not defined问题-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:2063
文章浏览阅读2.4w次,点赞11次,收藏25次。1.问题在调试js代码的时候,发现浏览器控制台中出现报错:$ is not defined2.原因出现以上问题的原因大致有一下几种:1.没有导入jQuery的jar包2.jQuery的jar包放进了WEB-INF里,jQuery的jar包最好放在WebContent下,跟WEB-INF同级3.导入jQuery的路径名没有写对4.jQuery没有包含js3.解决方法:在js代码之前导包:<script type="text/javascript" src="/test/js_$ is not defined
版权声明:本文发布于特牛网址导航 内容均来源于互联网 如有侵权联系删除