请引用下面的html代码
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<title></title>
<script src="Scripts/jquery-2.0.0.min.js"></script>
</head>
<body>
<div id="container"></div>
</body>
</html>
当我在 IE7 浏览器中打开此 html 页面时,它会抛出类似“JSON”未定义 的错误,如果我在 IE8 浏览器中打开相同的页面,则意味着它会抛出类似“对象不支持属性”的错误或方法 'addEventListener'
我该如何解决这个问题?
谢谢,
湿婆
最佳答案
jQuery 2 不支持 IE 8 及更早版本。如果您想支持这些浏览器,请使用(仍受支持的)jQuery 1.x 分支。
关于javascript - 使用最新的 jquery 版本时 JSON 是未定义的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18202842/