IE8 不支持 JQuery

标签 jquery internet-explorer cross-browser

IE 总是出现问题。

在我的网页中,我在本地包含了 JQuery,如下所示:

<script type="text/javascript" src="../jsp/jquery-2.0.2.min.js"></script>
<script type="text/javascript" src="../jsp/jquery-ui-1.10.3.custom.js"></script>
<script type="text/javascript" src="../jsp/init.js"></script>
<script type="text/javascript" src="../jsp/tajweed.js"></script>
<script type="text/javascript" src="../jsp/tajweed-tools.js"></script>  

但是,它给出了这些错误:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3)
Timestamp: Thu, 25 Jul 2013 10:17:38 UTC


Message: 'JSON' is undefined
Line: 4
Char: 562
Code: 0
URI: http://localhost/play/jsp/jquery-2.0.2.min.js


Message: 'jQuery' is undefined
Line: 6
Char: 1
Code: 0
URI: http://localhost/play/jsp/jquery-ui-1.10.3.custom.js


Message: Object expected
Line: 37
Char: 1
Code: 0
URI: http://localhost/play/jsp/init.js


Message: Object expected
Line: 2
Char: 1
Code: 0
URI: http://localhost/play/jsp/tajweed.js

我搜索了一些主题,例如 TOPIC 1TOPIC 2但徒劳无功。

最佳答案

Jquery 2.x 明确不支持 IE8。

如果您想支持此浏览器,请使用 1.x 版本。

来自the download page :

jQuery 2.x has the same API as jQuery 1.x, but does not support Internet Explorer 6, 7, or 8.

关于IE8 不支持 JQuery,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17855257/

相关文章:

javascript - 选择元素数组,然后给它方法

javascript - slider 在浏览器中显示为框,但在 Fiddle 中工作正常(控制台中无错误显示)

javascript - 带有切换 div 显示/隐藏的列表

html - 摆脱网页上不需要的布局元素

jquery - 我的 jQuery 代码无法在 IE 中运行

javascript - 向表中添加动态数据

internet-explorer - PIE.htc 不能在不同的网络服务器上工作

javascript - IE9 - 添加和删除 DOM 元素会破坏父 keydown 事件

javascript - CSS 缩放属性

html - 当点击目标 ="_blank"的链接时,新窗口上的 sessionStorage 不为空