代码之家  ›  专栏  ›  技术社区  ›  Ben Shelock

到Internet Explorer中的源[副本]

  •  1
  • Ben Shelock  · 技术社区  · 16 年前

    可能重复:
    Javascript toSource() method not working
    Implementing Mozilla’s toSource() method in Internet Explorer.

    对于Internet Explorer,是否有其他方法可供选择?

    2 回复  |  直到 16 年前
        1
  •  4
  •   Community Mohan Dere    9 年前

    toSource 是非标准的,只能在Gecko引擎中工作,因此不能在Chrome、Safari中工作 IE.

    this 所以问题和答案。

        2
  •  0
  •   gnarf    16 年前

    它与 toSource() 但是 json2.js JSON.stringify() 它将把一个javascript对象转换为JSON。这不会改变所有 .toSource() 威尔。例如,它不处理函数。