'JSON' 仅在 IE 中是未定义的错误 [英] 'JSON' is undefined error in IE only

查看:29
本文介绍了'JSON' 仅在 IE 中是未定义的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在对 WCF 服务进行 AJAX 调用,当我传入我的数据时,我使用 JSON.stringify()

I'm making an AJAX call to a WCF service and when I pass in my data i use JSON.stringify()

调用返回并在 FF 中正常工作,&Chrome,但不是 IE8.我收到一个错误:'JSON' 未定义

The call returns and works fine in FF, & Chrome, but not IE8. I get an error: 'JSON' is undefined

建议?

附言我也希望它在 IE7 中工作

p.s. I also want this to work in IE7

推荐答案

使用 json2 实现一致的跨浏览器实现.

Use json2 for a consistent cross browser implementation.

https://github.com/douglascrockford/JSON-js

这篇关于'JSON' 仅在 IE 中是未定义的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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