![](/img/trans.png)
[英]How can I add content to a page after opening the link in a new window/tab?
[英]How to show the content in a new tab or window after clicking on a link
我有一个链接“帮助”。 单击帮助链接后,内容必须显示在新标签或新的完整窗口中。如果我传递链接,例如“ google.com”,则该链接会在新标签页中打开,但我传递的是htm文件。因此,我在弹出窗口中获取内容。 如何避免这种情况,如何在新的完整窗口或选项卡中获取内容? 有人可以帮我吗? 提前致谢。
我的代码:
var newtab=window.open();
newtab.location=a_pszHelpFile;
我也试过这个:
var win=window.open(a_pszHelpFile, '_blank');
win.focus();
我尝试过的事情:
window.onload = window.open(a_pszHelpFile, "__webCshStub", "width=1000,height=1000");
window.open(a_pszHelpFile, "__new", "width=1000,height=1000");
当我使用此功能时,会弹出一个小窗口。
window.open(a_pszHelpFile, "_blank");
如果指定宽度和高度,这就是我得到的。
如何在新标签页中获取内容?
我尝试了没有任何属性(只是网址)的操作,并在新标签页中将其打开
window.open(a_pszHelpFile);
看看这是否也适合您
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.