0
我用下面的代碼來創建一個iframe:iframe的內容在IE中獲取html是未定義的?
Ifrm = document.createElement("IFRAME");
document.body.appendChild(Ifrm);
IfrmBod = $(Ifrm).contents().find('body');
IfrmBod.append('<p>Test</p>');
追加jQuery函數不正確,即工作的這個例子。 最後 當我使用IfrmBod.html()
時,它在Chrome中正常工作,但在IE中不起作用。在IE IfrmBod.html()
未定義。
它在其他瀏覽器中工作正常嗎? –
http://stackoverflow.com/questions/9527582/write-some-html-and-js-to-a-iframe-not-working-in-ie-is-not-defined –
請不要大寫每個單詞一句話。這是非常刺激閱讀 – mplungjan