var theNewWindow = window.open('http://www.example.com', 'example', '');
如何使用theNewWindow
的document
对象来动态更新新窗口的dom。
最佳答案
您可以,前提是新页面是相同的域或 about:blank。例如:
var temp = window.open('about:blank', 'example', '');
var div = temp.document.createElement("div");
div.innerHTML = "Hello!";
temp.document.body.appendChild( div );
关于javascript - window.open 的文档对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8271864/