标题有点模糊,但我似乎找不到对这个问题的正确描述。基本上,由于某些原因,我的JQuery没有运行,似乎是由于jquery没有被启用,但在我的脚本调用之前,链接就在那里。Here is the general idea
然而,当我在本地运行脚本时,在mozilla中得到一个错误,jquery没有运行,在悬停时什么也没有发生:
ReferenceError: $ is not defined @index.js:3
据我所知,一切都很完美,但是JQuery库似乎没有注册,这是我的想法:
<head>
<title>Javascript Tetris</title>
<link rel = "stylesheet" type = "text/css" href = "index.css"><!--add the css-->
<script src = "//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script><!--add jquery library-->
<script src = "index.js"></script><!--add javascript file-->
</head>
有什么想法吗?
发布于 2013-03-06 13:50:29
您应该使用:
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
你错过了https
发布于 2013-03-06 13:50:19
<script src = "//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script><!--add jquery library-->
//正在尝试从本地文件系统中拉出。这在服务器上可以很好地工作,但在本地机器上,您必须指定http或https。
发布于 2013-03-06 13:50:51
在这里发帖之前先检查一下你的系统
你错过了http:
<script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
https://stackoverflow.com/questions/15239904
复制相似问题