gpt4 book ai didi

javascript - 如何将带有 HTML 信息的 Json 文件放入 DOM 中?

转载 作者:行者123 更新时间:2023-11-30 10:47:06 27 4
gpt4 key购买 nike

我正在写一个 firefox 扩展,我有这个小的 json 文件:

for (;;);{"__ar":1,"payload":{"stackable":[true,false],"title":{"__html":"How You Connect"},"body":{"__html":"\u003cdiv class=\"pam\">\u003cul class=\"uiList\">\u003cli class=\"pbm uiListItem uiListLight uiListVerticalItemBorder\">\u003cdiv class=\"clearfix fbPrivacyConnectItem\">\u003cdiv class=\"privacyLabel lfloat\">Who can look up your profile by name or contact info?\u003c\/div>\u003cdiv class=\"itemControl rfloat\">\u003cdiv class=\"uiSelector inlineBlock audienceSelector dynamicIconSelector uiSelectorRight uiSelectorNormal uiSelectorDynamicLabel uiSelectorDynamicTooltip\" data-name=\"audience[8787330733][value]\">\u003cdiv class=\"wrap\">\u003ca class=\"uiTooltip uiSelectorButton uiButton\" onmouseout=\"this.blur();\" role=\"button\" href=\"#\" aria-haspopup=\"1\" data-length=\"30\" rel=\"toggle\">\u003ci class=\"mrs defaultIcon customimg img sp_7kwant sx_b2461a\">\u003c\/i>\u003cspan class=\"uiButtonText\">Everyone\u003c\/span>\u003cspan class=\"uiTooltipWrap top right righttop\">\u003cspan class=\"uiTooltipText uiTooltipNoWrap\">Everyone\u003c\/span>\u003c\/span>\u003c\/a>\u003cdiv class=\"uiSelectorMenuWrapper uiToggleFlyout\">\u003cdiv role=\"menu\" class=\"uiMenu uiSelectorMenu\">\u003cul class=\"uiMenuInner\">\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption checked\" data-label=\"Everyone\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"0\" aria-checked=\"true\" href=\"#\" rel=\"async-post\" ajaxify=\"\/ajax\/privacy\/simple_save.php?id=8787330733&audience_json=\u00257B\u0025228787330733\u002522\u00253A\u00257B\u002522value\u002522\u00253A\u00252280\u002522\u00257D\u00257D\">\u003ci class=\"mrs itemIcon img sp_7kwant sx_b2461a\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Everyone\u003c\/span>\u003c\/a>\u003c\/li>\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption\" data-label=\"Friends of Friends\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"-1\" aria-checked=\"false\" href=\"#\" rel=\"async-post\" ajaxify=\"\/ajax\/privacy\/simple_save.php?id=8787330733&audience_json=\u00257B\u0025228787330733\u002522\u00253A\u00257B\u002522value\u002522\u00253A\u00252250\u002522\u00257D\u00257D\">\u003ci class=\"mrs itemIcon img sp_8n1pd0 sx_20b2e8\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Friends of Friends\u003c\/span>\u003c\/a>\u003c\/li>\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption\" data-label=\"Friends\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"-1\" aria-checked=\"false\" href=\"#\" rel=\"async-post\" ajaxify=\"\/ajax\/privacy\/simple_save.php?id=8787330733&audience_json=\u00257B\u0025228787330733\u002522\u00253A\u00257B\u002522value\u002522\u00253A\u00252240\u002522\u00257D\u00257D\">\u003ci class=\"mrs itemIcon img sp_7kwant sx_deb81f\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Friends\u003cspan class=\"plusLabel hidden_elem fcg\"> (+)\u003c\/span>\u003c\/span>\u003c\/a>\u003c\/li>\u003c\/ul>\u003c\/div>\u003c\/div>\u003c\/div>\u003cselect name=\"audience[8787330733][value]\">\u003coption value=\"\">\u003c\/option>\u003coption value=\"80\" selected=\"1\">Everyone\u003c\/option>\u003coption value=\"50\">Friends of Friends\u003c\/option>\u003coption value=\"40\">Friends\u003c\/option>\u003c\/select>\u003c\/div>\u003c\/div>\u003c\/div>\u003c\/li>\u003cli class=\"pvm uiListItem uiListLight uiListVerticalItemBorder\">\u003cdiv class=\"clearfix fbPrivacyConnectItem\">\u003cdiv class=\"privacyLabel lfloat\">Who can send you friend requests?\u003c\/div>\u003cdiv class=\"itemControl rfloat\">\u003cdiv class=\"uiSelector inlineBlock audienceSelector dynamicIconSelector uiSelectorRight uiSelectorNormal uiSelectorDynamicLabel uiSelectorDynamicTooltip\" data-name=\"audience[8787540733][value]\">\u003cdiv class=\"wrap\">\u003ca class=\"uiTooltip uiSelectorButton uiButton\" onmouseout=\"this.blur();\" role=\"button\" href=\"#\" aria-haspopup=\"1\" data-length=\"30\" rel=\"toggle\">\u003ci class=\"mrs defaultIcon customimg img sp_7kwant sx_b2461a\">\u003c\/i>\u003cspan class=\"uiButtonText\">Everyone\u003c\/span>\u003cspan class=\"uiTooltipWrap top right righttop\">\u003cspan class=\"uiTooltipText uiTooltipNoWrap\">Everyone\u003c\/span>\u003c\/span>\u003c\/a>\u003cdiv class=\"uiSelectorMenuWrapper uiToggleFlyout\">\u003cdiv role=\"menu\" class=\"uiMenu uiSelectorMenu\">\u003cul class=\"uiMenuInner\">\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption checked\" data-label=\"Everyone\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"0\" aria-checked=\"true\" href=\"#\" rel=\"async-post\" ajaxify=\"\/ajax\/privacy\/simple_save.php?id=8787540733&audience_json=\u00257B\u0025228787540733\u002522\u00253A\u00257B\u002522value\u002522\u00253A\u00252280\u002522\u00257D\u00257D\">\u003ci class=\"mrs itemIcon img sp_7kwant sx_b2461a\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Everyone\u003c\/span>\u003c\/a>\u003c\/li>\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption\" data-label=\"Friends of Friends\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"-1\" aria-checked=\"false\" href=\"#\" rel=\"async-post\" ajaxify=\"\/ajax\/privacy\/simple_save.php?id=8787540733&audience_json=\u00257B\u0025228787540733\u002522\u00253A\u00257B\u002522value\u002522\u00253A\u00252250\u002522\u00257D\u00257D\">\u003ci class=\"mrs itemIcon img sp_8n1pd0 sx_20b2e8\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Friends of Friends\u003c\/span>\u003c\/a>\u003c\/li>\u003c\/ul>\u003c\/div>\u003c\/div>\u003c\/div>\u003cselect name=\"audience[8787540733][value]\">\u003coption value=\"\">\u003c\/option>\u003coption value=\"80\" selected=\"1\">Everyone\u003c\/option>\u003coption value=\"50\">Friends of Friends\u003c\/option>\u003c\/select>\u003c\/div>\u003c\/div>\u003c\/div>\u003c\/li>\u003cli class=\"pvm uiListItem uiListLight uiListVerticalItemBorder\">\u003cdiv class=\"clearfix fbPrivacyConnectItem\">\u003cdiv class=\"privacyLabel lfloat\">Who can send you Facebook messages?\u003c\/div>\u003cdiv class=\"itemControl rfloat\">\u003cdiv class=\"uiSelector inlineBlock audienceSelector dynamicIconSelector uiSelectorRight uiSelectorNormal uiSelectorDynamicLabel uiSelectorDynamicTooltip\" data-name=\"audience[8787545733][value]\">\u003cdiv class=\"wrap\">\u003ca class=\"uiTooltip uiSelectorButton uiButton\" onmouseout=\"this.blur();\" role=\"button\" href=\"#\" aria-haspopup=\"1\" data-length=\"30\" rel=\"toggle\">\u003ci class=\"mrs defaultIcon customimg img sp_7kwant sx_b2461a\">\u003c\/i>\u003cspan class=\"uiButtonText\">Everyone\u003c\/span>\u003cspan class=\"uiTooltipWrap top right righttop\">\u003cspan class=\"uiTooltipText uiTooltipNoWrap\">Everyone\u003c\/span>\u003c\/span>\u003c\/a>\u003cdiv class=\"uiSelectorMenuWrapper uiToggleFlyout\">\u003cdiv role=\"menu\" class=\"uiMenu uiSelectorMenu\">\u003cul class=\"uiMenuInner\">\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption checked\" data-label=\"Everyone\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"0\" aria-checked=\"true\" href=\"#\" rel=\"async-post\" ajaxify=\"\/ajax\/privacy\/simple_save.php?id=8787545733&audience_json=\u00257B\u0025228787545733\u002522\u00253A\u00257B\u002522value\u002522\u00253A\u00252280\u002522\u00257D\u00257D\">\u003ci class=\"mrs itemIcon img sp_7kwant sx_b2461a\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Everyone\u003c\/span>\u003c\/a>\u003c\/li>\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption\" data-label=\"Friends of Friends\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"-1\" aria-checked=\"false\" href=\"#\" rel=\"async-post\" ajaxify=\"\/ajax\/privacy\/simple_save.php?id=8787545733&audience_json=\u00257B\u0025228787545733\u002522\u00253A\u00257B\u002522value\u002522\u00253A\u00252250\u002522\u00257D\u00257D\">\u003ci class=\"mrs itemIcon img sp_8n1pd0 sx_20b2e8\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Friends of Friends\u003c\/span>\u003c\/a>\u003c\/li>\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption\" data-label=\"Friends\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"-1\" aria-checked=\"false\" href=\"#\" rel=\"async-post\" ajaxify=\"\/ajax\/privacy\/simple_save.php?id=8787545733&audience_json=\u00257B\u0025228787545733\u002522\u00253A\u00257B\u002522value\u002522\u00253A\u00252240\u002522\u00257D\u00257D\">\u003ci class=\"mrs itemIcon img sp_7kwant sx_deb81f\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Friends\u003cspan class=\"plusLabel hidden_elem fcg\"> (+)\u003c\/span>\u003c\/span>\u003c\/a>\u003c\/li>\u003c\/ul>\u003c\/div>\u003c\/div>\u003c\/div>\u003cselect name=\"audience[8787545733][value]\">\u003coption value=\"\">\u003c\/option>\u003coption value=\"80\" selected=\"1\">Everyone\u003c\/option>\u003coption value=\"50\">Friends of Friends\u003c\/option>\u003coption value=\"40\">Friends\u003c\/option>\u003c\/select>\u003c\/div>\u003c\/div>\u003c\/div>\u003c\/li>\u003cli class=\"pvm uiListItem uiListLight uiListVerticalItemBorder\">\u003cdiv class=\"clearfix fbPrivacyConnectItem\">\u003cdiv class=\"privacyLabel lfloat\">Who can post on your Wall?\u003c\/div>\u003cdiv class=\"itemControl rfloat\">\u003cdiv class=\"uiSelector inlineBlock audienceSelector dynamicIconSelector uiSelectorRight uiSelectorNormal uiSelectorDynamicLabel uiSelectorDynamicTooltip\" data-name=\"audience[0][value]\">\u003cdiv class=\"wrap\">\u003ca class=\"uiTooltip uiSelectorButton uiButton\" onmouseout=\"this.blur();\" role=\"button\" href=\"#\" aria-haspopup=\"1\" data-length=\"30\" rel=\"toggle\">\u003ci class=\"mrs defaultIcon customimg img sp_7kwant sx_deb81f\">\u003c\/i>\u003cspan class=\"uiButtonText\">Friends\u003c\/span>\u003cspan class=\"uiTooltipWrap top right righttop\">\u003cspan class=\"uiTooltipText uiTooltipNoWrap\">Friends\u003c\/span>\u003c\/span>\u003c\/a>\u003cdiv class=\"uiSelectorMenuWrapper uiToggleFlyout\">\u003cdiv role=\"menu\" class=\"uiMenu uiSelectorMenu\">\u003cul class=\"uiMenuInner\">\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption checked\" data-label=\"Friends\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"0\" aria-checked=\"true\" href=\"#\" rel=\"ignore\">\u003ci class=\"mrs itemIcon img sp_7kwant sx_deb81f\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Friends\u003cspan class=\"plusLabel hidden_elem fcg\"> (+)\u003c\/span>\u003c\/span>\u003c\/a>\u003c\/li>\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption\" data-label=\"Only Me\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"-1\" aria-checked=\"false\" href=\"#\" rel=\"ignore\">\u003ci class=\"mrs itemIcon img sp_dvtjtj sx_e7fbcd\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Only Me\u003c\/span>\u003c\/a>\u003c\/li>\u003c\/ul>\u003c\/div>\u003c\/div>\u003c\/div>\u003cselect name=\"audience[0][value]\">\u003coption value=\"\">\u003c\/option>\u003coption value=\"40\" selected=\"1\">Friends\u003c\/option>\u003coption value=\"10\">Only Me\u003c\/option>\u003c\/select>\u003c\/div>\u003c\/div>\u003c\/div>\u003c\/li>\u003cli class=\"ptm uiListItem uiListLight uiListVerticalItemBorder\">\u003cdiv class=\"clearfix fbPrivacyConnectItem\">\u003cdiv class=\"privacyLabel lfloat\">Who can see Wall posts by others on your profile?\u003c\/div>\u003cdiv class=\"itemControl rfloat\">\u003cdiv class=\"uiSelector inlineBlock audienceSelector dynamicIconSelector uiSelectorRight uiSelectorNormal uiSelectorDynamicLabel uiSelectorDynamicTooltip\" data-name=\"audience[8787370733][value]\">\u003cdiv class=\"wrap\">\u003ca class=\"uiTooltip uiSelectorButton uiButton\" onmouseout=\"this.blur();\" role=\"button\" href=\"#\" aria-haspopup=\"1\" data-length=\"30\" rel=\"toggle\">\u003ci class=\"mrs defaultIcon customimg img sp_8n1pd0 sx_20b2e8\">\u003c\/i>\u003cspan class=\"uiButtonText\">Friends of Friends\u003c\/span>\u003cspan class=\"uiTooltipWrap top right righttop\">\u003cspan class=\"uiTooltipText uiTooltipNoWrap\">Friends of Friends\u003c\/span>\u003c\/span>\u003c\/a>\u003cdiv class=\"uiSelectorMenuWrapper uiToggleFlyout\">\u003cdiv role=\"menu\" class=\"uiMenu uiSelectorMenu\">\u003cul class=\"uiMenuInner\">\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption\" data-label=\"Public\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"0\" aria-checked=\"false\" href=\"#\" rel=\"async-post\" ajaxify=\"\/ajax\/privacy\/simple_save.php?id=8787370733&audience_json=\u00257B\u0025228787370733\u002522\u00253A\u00257B\u002522value\u002522\u00253A\u00252280\u002522\u00257D\u00257D\">\u003ci class=\"mrs itemIcon img sp_7kwant sx_b2461a\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Public\u003c\/span>\u003c\/a>\u003c\/li>\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption checked\" data-label=\"Friends of Friends\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"-1\" aria-checked=\"true\" href=\"#\" rel=\"async-post\" ajaxify=\"\/ajax\/privacy\/simple_save.php?id=8787370733&audience_json=\u00257B\u0025228787370733\u002522\u00253A\u00257B\u002522value\u002522\u00253A\u00252250\u002522\u00257D\u00257D\">\u003ci class=\"mrs itemIcon img sp_8n1pd0 sx_20b2e8\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Friends of Friends\u003c\/span>\u003c\/a>\u003c\/li>\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption\" data-label=\"Friends\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"-1\" aria-checked=\"false\" href=\"#\" rel=\"async-post\" ajaxify=\"\/ajax\/privacy\/simple_save.php?id=8787370733&audience_json=\u00257B\u0025228787370733\u002522\u00253A\u00257B\u002522value\u002522\u00253A\u00252240\u002522\u00257D\u00257D\">\u003ci class=\"mrs itemIcon img sp_7kwant sx_deb81f\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Friends\u003cspan class=\"plusLabel hidden_elem fcg\"> (+)\u003c\/span>\u003c\/span>\u003c\/a>\u003c\/li>\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption\" data-label=\"Only Me\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"-1\" aria-checked=\"false\" href=\"#\" rel=\"async-post\" ajaxify=\"\/ajax\/privacy\/simple_save.php?id=8787370733&audience_json=\u00257B\u0025228787370733\u002522\u00253A\u00257B\u002522value\u002522\u00253A\u00252210\u002522\u00257D\u00257D\">\u003ci class=\"mrs itemIcon img sp_dvtjtj sx_e7fbcd\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Only Me\u003c\/span>\u003c\/a>\u003c\/li>\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption\" data-label=\"Custom\" id=\"uo28p0_1\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"-1\" aria-checked=\"false\" href=\"#\" rel=\"ignore\">\u003ci class=\"mrs itemIcon img sp_7kwant sx_bd80ab\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Custom\u003cspan class=\"customPrivacyInputs\">\u003c\/span>\u003c\/span>\u003c\/a>\u003c\/li>\u003cli class=\"uiMenuSeparator\">\u003c\/li>\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption friendListOption specialOption primaryOption\" data-label=\"Close Friends\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"-1\" aria-checked=\"false\" href=\"#\" rel=\"async-post\" ajaxify=\"\/ajax\/privacy\/simple_save.php?id=8787370733&audience_json=\u00257B\u0025228787370733\u002522\u00253A\u00257B\u002522value\u002522\u00253A\u002522119853121454552\u002522\u00257D\u00257D\">\u003ci class=\"mrs itemIcon img sp_7kwant sx_dfa161\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Close Friends\u003c\/span>\u003c\/a>\u003c\/li>\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption friendListOption specialOption primaryOption\" data-label=\"Family\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"-1\" aria-checked=\"false\" href=\"#\" rel=\"async-post\" ajaxify=\"\/ajax\/privacy\/simple_save.php?id=8787370733&audience_json=\u00257B\u0025228787370733\u002522\u00253A\u00257B\u002522value\u002522\u00253A\u002522119853124787885\u002522\u00257D\u00257D\">\u003ci class=\"mrs itemIcon img sp_7kwant sx_227950\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Family\u003c\/span>\u003c\/a>\u003c\/li>\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption fbPrivacyAudienceSelectorOption friendListOption specialOption primaryOption\" data-label=\"Acquaintances\">\u003ca class=\"itemAnchor itemWithIcon\" role=\"menuitemradio\" tabindex=\"-1\" aria-checked=\"false\" href=\"#\" rel=\"async-post\" ajaxify=\"\/ajax\/privacy\/simple_save.php?id=8787370733&audience_json=\u00257B\u0025228787370733\u002522\u00253A\u00257B\u002522value\u002522\u00253A\u002522100002895945078_124542800973931\u002522\u00257D\u00257D\">\u003ci class=\"mrs itemIcon img sp_7kwant sx_59bac9\">\u003c\/i>\u003cspan class=\"itemLabel fsm\">Acquaintances\u003c\/span>\u003c\/a>\u003c\/li>\u003cli class=\"uiMenuSeparator secondaryOption\">\u003c\/li>\u003cli class=\"uiMenuItem uiMenuItemRadio uiSelectorOption returnOption secondaryOption specialOption\" data-label=\"Return\">\u003ca class=\"itemAnchor\" role=\"menuitemradio\" tabindex=\"-1\" aria-checked=\"false\" href=\"#\" rel=\"ignore\">\u003cspan class=\"itemLabel fsm\">Return\u003c\/span>\u003c\/a>\u003c\/li>\u003c\/ul>\u003c\/div>\u003c\/div>\u003c\/div>\u003cselect name=\"audience[8787370733][value]\">\u003coption value=\"\">\u003c\/option>\u003coption value=\"80\">Public\u003c\/option>\u003coption value=\"50\" selected=\"1\">Friends of Friends\u003c\/option>\u003coption value=\"40\">Friends\u003c\/option>\u003coption value=\"10\">Only Me\u003c\/option>\u003coption value=\"111\">Custom\u003c\/option>\u003coption value=\"119853121454552\">Close Friends\u003c\/option>\u003coption value=\"119853124787885\">Family\u003c\/option>\u003coption value=\"100002895945078_124542800973931\">Acquaintances\u003c\/option>\u003coption value=\"Return\">Return\u003c\/option>\u003c\/select>\u003c\/div>\u003c\/div>\u003c\/div>\u003c\/li>\u003c\/ul>\u003c\/div>"},"contentWidth":540,"fullBleed":false,"buttons":[{"name":"done","label":"Done","handler":"Dialog.getCurrent().hide()"}],"buttonsMessage":"\u003ca href=\"\/help\/privacy\">Learn more\u003c\/a>","postURI":["\/ajax\/settings\/privacy\/connections_can_post_save.php",true],"secure":false},"css":["Fe9Fn","6x0ig","tWyR7"],"js":["poN6f","VVPTI"],"onload":["JSCC.get('j4e8ca57f0a8f045518753661').init(\"uo28p0_1\", \"8787370733\", true, \"\", true);"],"bootloadable":{"async":["LayX0","Vroh4","6liCk"],"iframe-shim":["LayX0","Vroh4","YxBS7"],"maxlength-form-listener":["LayX0","Vroh4","poN6f"],"dom-scroll":["LayX0","Vroh4","poN6f"],"animation":["LayX0","Vroh4"]},"resource_map":{"Fe9Fn":{"type":"css","src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/y9\/r\/gpPkWs8bLEo.css"},"6x0ig":{"type":"css","permanent":1,"nonblocking":1,"src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/yR\/r\/ITJh_KJve0v.css"},"tWyR7":{"type":"css","nonblocking":1,"src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/yn\/r\/U1Xcl_cw8Or.css"},"poN6f":{"type":"js","src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/y-\/r\/AkEj5nFsB5x.js"},"VVPTI":{"type":"js","src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/yC\/r\/K1e4uscht3y.js"},"LayX0":{"type":"js","src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/yj\/r\/-eXzfKGl5Cz.js"},"Vroh4":{"type":"js","src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/y8\/r\/7Htnnss1mJY.js"},"6liCk":{"type":"css","permanent":1,"src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/y_\/r\/WsQZCwjJUxu.css"},"YxBS7":{"type":"js","src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/yc\/r\/DzkM-7DYccQ.js"}},"jscc":"JSCC.init({\"j4e8ca57f0a8f045518753661\":function(){return new CustomPrivacyOption();}});"}

现在我想检查设置(这是一个对话框)。我想将它放入 DOM 并使用 jquery 提取信息。

最佳答案

谢谢 Wladimir Palant 和 Xeon06。

在你的帮助下我找到了正确的方法 ;)这是所有遇到同样问题的人的完整代码

response = response.replace(/.*?;{/, "{");                        
jsonFile = JSON.parse(response);
$('#globalContainer').append(jsonFile.payload.body.__html)

关于javascript - 如何将带有 HTML 信息的 Json 文件放入 DOM 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7666139/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com