Internet Explorer 9中的JSON支持 [英] JSON support in Internet explorer 9

查看:142
本文介绍了Internet Explorer 9中的JSON支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在IE9中运行它:

if (typeof(JSON) === 'object' && 
    typeof(JSON.parse) === 'function') {
  // Native JSON parsing is available.
}

它不支持本地json.我怎么了 IE浏览器中的安全设置是否可能出错?

It does not support native json. What do I wrong? Could there be wrong security settings in my IE ?

推荐答案

也许您的页面处于怪癖模式?我相信您需要IE9的标准模式才能启用JSON.

Perhaps your page is in quirks mode? I believe you need standards mode for IE9 to enable JSON.

确保在<!DOCTYPE之前没有任何怪异,并确保它是触发IE9中标准模式的一种.

Make sure you don't have any weirdness before your <!DOCTYPE and make sure it's one that triggers standards mode in IE9.

这篇关于Internet Explorer 9中的JSON支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆