页面调试时,明明引入了JQ文件,却一直提示Uncaught ReferenceError: jQuery is not defined错误。

转自:http://blog.csdn.net/baicp3/article/details/25419977

  • js路径问题,确保script的src引用路径正确

  • 页面jquery.js的引用位置问题,如果导入了其它与jquery有关的js文件,那么jquery.js须在其它js的前面

    错误引用位置

    <script type="text/javascript" src="js/jquery-ui-1.10.4.custom.js"></script>

    <script type="text/javascript" src="js/jquery-1.10.2.js"></script

    正确引用位置

    <script type="text/javascript" src="js/jquery-1.10.2.js"></script>

    <script type="text/javascript" src="js/jquery-ui-1.10.4.custom.js"></script>  

  • 相关文章:

    • 2021-07-11
    • 2021-09-16
    • 2021-06-16
    • 2021-09-15
    • 2022-12-23
    • 2022-12-23
    猜你喜欢
    • 2021-04-27
    • 2021-06-29
    • 2021-04-21
    • 2021-06-30
    • 2022-12-23
    • 2021-09-23
    相关资源
    相似解决方案