在我的情况下,如何打开新的弹出窗口

How to open new popup windows in my case?

本文关键字:窗口 何打开 我的 情况下      更新时间:2023-09-26

我想在用户单击链接时打开一个新窗口作为弹出窗口,并在用户再次单击链接时将其用作唯一的弹出窗口。我不知道该怎么做。

我试过

window.open('test/'+id+'.html','','width=1017, height=689', true);

并尝试在其中添加不同的参数,但仍然不确定如何做到这一点。

有人能帮我吗?非常感谢

您可以按照@Dagg的建议使用窗口名称。

window.open('/test1', 'window_name', true);

然后,如果你想在同一弹出窗口中打开另一个url:

window.open('/test2', 'window_name', true);