'jQuery'仅在IE中未定义 [英] 'jQuery' is undefined in IE only
问题描述
我有一个html文件,可以在IE以外的所有浏览器中使用。在IE中我收到错误
I have a html file which works perfectly in all the browsers other than IE. In IE I am getting an error
SCRIPT5009: 'jQuery' is undefined
但是这个问题可以通过在任何eitor中打开这个文件说index.html来修复,并以不同的名称保存。但是如果我将此文件保存为index.html本身,则不会修复问题。
But this issue can be fixed by opening this file say index.html in any eitor and save it in different name. But if I save this file as index.html itself, issue will not be fixed.
任何人都可以告诉我这是什么问题吗?!!
Can any one let me know what is this issue?!!
推荐答案
-
如果您使用过
application / javascript
,请更改为text / javascript
检查jquery的路径
是你的jquery在 lib / js /
,或只是 lib /
?
Check the path of jquery
is your jquery in lib/js/
, or just lib/
?
确保您的lib目录相对于调用页面
你可能意味着 /lib/jquery.js
(开头的斜线有所不同)。
Make sure your lib directory is relative to the calling page
You may have meant /lib/jquery.js
(the slash in the beginning makes a difference).
愿这会有所帮助。来自 Jquery论坛。
May this will help.There is a link from Jquery forum.
这篇关于'jQuery'仅在IE中未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!