jquery solves the problem that IE6, 7, 8 cannot use json.stringify functions _jquery

Source: Internet
Author: User
Tags string back

The JSON object was implemented in the 5th edition of ECMAScript, published in December 2009, and IE6 IE7 and IE8 (q) (IE8), equivalent to IE 5.5, were published earlier and did not implement the object in its Javascript engine.

Fortunately we can use json2.js as compatibility.

Address: Https://github.com/douglascrockford/JSON-js

This JS function converts the JSON object into a JSON string, solving the problem that IE6, 7, 8 cannot use the Json.stringify function!

Copy Code code as follows:
<!--[If Lt IE 9]>
<script src= "Json2.js" ></script>
<! [endif]-->

So json.stringify can be used normally!
After you get the JSON string back to the server, PHP will do json_decode.

The above is jquery solution IE6, 7, 8 can not use Json.stringify specific method, hope to give you a reference, also hope that we support cloud habitat community.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.