[英]How can I add content to a page after opening the link in a new window/tab?
我正在尝试将一些内容添加到在新标签页/窗口中打开的页面中,似乎什么也没有发生。 这是我的一些代码:
var newWindow = window.open('/Window');
newWindow.document.body.innerHTML += '<div>This is a test</div>';
有任何想法吗?
如您所标记的jquery:
var w = window.open();
var html = '<div>This is a test</div>';
$(w.document.body).html(html);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.