开发者

toSource in internet explorer [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicates:

Javascript toSource() method not working

Implementing Mozilla’s toSource() method in Internet Explorer.

Is 开发者_开发问答there an alternative method toSource for internet explorer?


toSource is non standard and works in the gecko engine only, so will not work in chrome, safari or IE.

See this SO question and answers.


It is not the same as toSource() but json2.js has JSON.stringify() which will convert a JavaScript object to JSON. This won't convert everything that .toSource() will. It doesn't for instance deal with functions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜