'JSON' is undefined error in JavaScript in Internet Explorer

前端 未结 7 1627
走了就别回头了
走了就别回头了 2020-12-23 19:45

We are using jQuery in our application. We have used a jQuery plugin to implement JavaScript session.

It is working properly in Firefox and most Internet Explorer 8

7条回答
  •  伪装坚强ぢ
    2020-12-23 20:10

    Maybe it is not what you are looking for, but I had a similar problem and i solved it including JSON 2 to my application:

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

    Other browsers natively implements JSON but IE < 8 (also IE 8 compatibility mode) does not, that's why you need to include it.

    Here is a related question: JSON on IE6 (IE7)

    UPDATE

    the JSON parser has been updated so you should use the new one: http://bestiejs.github.io/json3/

提交回复
热议问题