jQuery解决IE6、7、8不能使用 JSON.stringify 函数的问题

https://github.com/douglascrockford/JSON-js
使用其中的 json2.js 作为兼容。
这个JS中的函数将JSON对象转换成JSON字符串,解决 IE6、7、8不能使用 JSON.stringify 函数的问题!

<!--[if lt IE 9]>
    <script src="json2.js"></script>
<![endif]-->


这样JSON.stringify 便可以正常使用!
得到JSON字符串后传回服务器,PHP作一下json_decode就行了。

posted @ 2015-04-16 16:49  海乐学习  阅读(560)  评论(0编辑  收藏  举报