最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - 'JSON' and 'jQuery' still undefined in Internet Explorer 7 and 8 - Stack Overflow

programmeradmin1浏览0评论

I got these three popular scripts included between my <head> tags

<script type="text/javascript" src="//ajax.googleapis/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare/ajax/libs/json3/3.2.6/json3.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.js"></script>

When I check for errors in IE7 and 8 I get the following:

  1. 'JSON' is undefined. (IE7)
  2. 'jQuery' is undefined. (IE7 and IE8)
  3. Object doesn't support this property or method. (IE8)

Can anybody tell me what is the cause of this, because I clearly am including those on my page, yet still e up as undefined. I have nothing else yet on my page besides these includes.

How can I fix this?

I got these three popular scripts included between my <head> tags

<script type="text/javascript" src="//ajax.googleapis./ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare./ajax/libs/json3/3.2.6/json3.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.js"></script>

When I check for errors in IE7 and 8 I get the following:

  1. 'JSON' is undefined. (IE7)
  2. 'jQuery' is undefined. (IE7 and IE8)
  3. Object doesn't support this property or method. (IE8)

Can anybody tell me what is the cause of this, because I clearly am including those on my page, yet still e up as undefined. I have nothing else yet on my page besides these includes.

How can I fix this?

Share Improve this question asked Dec 2, 2013 at 0:22 Kid DiamondKid Diamond 2,3018 gold badges40 silver badges85 bronze badges 1
  • 3 blog.jquery./2013/04/18/jquery-2-0-released No more support for IE 6/7/8 – Adam Jenkins Commented Dec 2, 2013 at 0:24
Add a ment  | 

1 Answer 1

Reset to default 7

jQuery 2.0 drops support for IE 6, 7 and 8, and is only meant for when you know you don't need to support those browsers. For most people the correct solution is to use jQuery 1.x instead, which is still officially supported:

<script type="text/javascript" src="//ajax.googleapis./ajax/libs/jquery/1.10.2/jquery.min.js"></script>
发布评论

评论列表(0)

  1. 暂无评论