【发布时间】:2023-01-31 22:00:59
【问题描述】:
const newChildWindow = window.open(
url, "_blank", `width="${altScreen.availWidth}", height="${altScreen.availHeight}"`
);
newChildWindow?.resizeTo(altScreen.availWidth, altScreen.availHeight);
newChildWindow?.moveTo(altScreen.left, 0);
fun1(){
this.doSetup("http://www.google.com");
}
fun2(){
this.doSetup("http://www.twitter.com");
}
fun3(){
this.doSetup("http://www.linkedin.com");
}
这些功能有 3 个不同的按钮。 我将 url 作为 arg 给出,它工作正常,但由于“_blank”每个链接都在不同的窗口中打开,我想要“_blank”但链接应该只覆盖那个特定的窗口。
是否可以?
【问题讨论】:
标签: angular typescript