我不知道如何解决这个问题,我试过阅读很多帖子但没有人回答。
我需要打开一个新窗口,其中包含一个已经编码的页面(在同一域内)并添加一些内容。
问题是,如果我使用 OpenWindow.write()
页面尚未加载,或者它覆盖了所有内容,并且只显示通过写入添加的代码。
var OpenWindow = window.open('mypage.html','_blank','width=335,height=330,resizable=1');
OpenWindow.document.write(output);
output
是我需要附加的代码。
我需要它至少在 Firefox、IE 和 GC 上工作。
提前致谢。如果我需要使用 JQuery,这不是问题。
原文由 Mario Corchero 发布,翻译遵循 CC BY-SA 4.0 许可协议
在
parent
.html 中:在
child.html
中: