[英]JSON is undefined error when using latest jquery version
請參考下面的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分支。
你應該只使用Jquery 1.9版本的IE 6,7,8
Jquery 2.0在older versions
的IE
不支持
As promised, this version leaves behind the older Internet Explorer 6, 7, and 8 browsers. In return it is smaller, faster, and can be used in JavaScript environments where the code needed for old-IE compatibility often causes problems of its own.
但不要擔心,jQuery團隊仍然支持在IE 6/7/8上運行的1.x分支 。 You can (and should) continue to use jQuery 1.9 (and the upcoming 1.10) on web sites that need to accommodate older browsers.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.