這是我的,它不工作。請幫忙。如何在新窗口中打開textarea?
var myWindow = window.open("","","width=600,height=450");
newContent = myWindow.document.createElement("textarea");
myWindow.document.appendChild(newContent);
這是我的,它不工作。請幫忙。如何在新窗口中打開textarea?
var myWindow = window.open("","","width=600,height=450");
newContent = myWindow.document.createElement("textarea");
myWindow.document.appendChild(newContent);
var myWindow = window.open("","","width=600,height=450");
newContent = myWindow.document.createElement("textarea");
myWindow.document.appendChild(newContent);
發送一個錯誤:
Uncaught HierarchyRequestError: Failed to execute 'appendChild' on 'Node': Nodes of type 'INPUT' may not be inserted inside nodes of type '#document'.
所以只是改變
myWindow.document.appendChild(newContent);
myWindow.document.body.appendChild(newContent);
不工作怎麼樣?你有沒有檢查你的JavaScript控制檯的錯誤? –
可能是彈出窗口阻止程序問題? – dfsq
不是彈出式窗口攔截器問題。 – SKaul