.jquery(..)is not a function解决办法
2016-11-17 18:46
363 查看
今天在做项目时,碰到了一个超奇怪的问题。我在html中的程序,跑的好好的,换成jsp在项目中跑,就一直报$ is not a function错。找了很久,试了很多,都没解决。后来,突然想到,将我引入的js文件的顺序换一下,将jquery的js文件第一个引入,别的js文件放到它后面。真的解决了问题!!!原来,在页面加载时,顺序加载引入的文件。要是jquery的js文件不是第一个被引入,那么别的js中的$.方法名就会报错。只有先引入了jquery的js文件,才能正确执行$.方法。特此备份!
相关文章推荐
- warning: the 'gets' function is dangerous and should not be used.的解决办法
- jQuery UI dialog插件出错信息:$(this).dialog is not a function及js引入重复解决办法
- 使用toFixed()函数时,出现“toFixed() is not a function”的解决办法
- $.cookie is not a function;原因及解决办法
- The function getUserId must be used with a prefix when a default namespace is not specified 解决办法
- warning: the 'gets' function is dangerous and should not be used.的解决办法
- Bootstrap 在F12控制台 出现“$(...).carousel is not a function”错误的解决办法
- 微信小程序报错:this.setData is not a function的解决办法
- 使用toFixed()函数时,出现“toFixed() is not a function”的解决办法
- angular 1.6 $http.get(...).success is not a function 解决办法
- $.cookie is not a function;原因及解决办法
- The function getUserId must be used with a prefix when a default namespace is not specified 解决办法
- uploadify动态更新配置参数方法uploadifySettings()报错“updateSettings is not a function”之解决办法
- unexcepted token 错误和XXX is not a function错误的解决办法
- Uncaught TypeError: $.cookie is not a function 解决办法
- warning: the 'gets' function is dangerous and should not be used.的解决办法
- jQuery.form Ajax无刷新上传报错 (jQuery.handleError is not a function) 解决办法
- jsp引入bootstrap、bootstrap-Validator后出现xxx is not a function的问题及解决办法!
- parser.parse is not a function——arcgis api报错解决办法
- warning: the 'gets' function is dangerous and should not be used.的解决办法