タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

JavaScriptとJSONとGreasemonkeyに関するefclのブックマーク (1)

  • JavaScript: createDocumentFromJSONString - mayokara note

    (GM_)XMLHttpRequestなどで取ってきたJSON文字列をDOMツリーに変換する関数を書いたのでメモ。 var createDocumentFromJSONString = function(str){ var json = (new Function('return (' + str + ');'))(), jsonDoc = document.implementation.createDocument("", "json", null); if (json instanceof Array) { jsonDoc.documentElement.setAttribute("type", "array"); json = { jsonarray: json }; } else if (typeof(json) === "object") { if (json === null)

    efcl
    efcl 2009/10/02
    (GM_)XMLHttpRequestなどで取ってきたJSON文字列をDOMツリーに変換する関数
  • 1