[英]closing window without window.open();
Is there any way to close a new tab window that was not opened using window.open();
有没有办法关闭未使用window.open();
打开的新选项卡窗口window.open();
? ?
否。如果您没有打开窗口,则不要关闭它。
Please see here: http://www.infimum.dk/HTML/JSwindows.html#ref_3_11 请在此处查看: http : //www.infimum.dk/HTML/JSwindows.html#ref_3_11
In order to close a specific window using the window.close() method you need a reference to that window, which you can usually get when opening a window using the window.open() method. 为了使用window.close()方法关闭特定窗口,您需要对该窗口的引用,通常可以在使用window.open()方法打开窗口时获得该引用。
Another option I can see is to use global window/frame references (self, parent, opener, etc...You can see the list in the link above as well). 我可以看到的另一种选择是使用全局窗口/框架引用(自身,父项,打开器等...您也可以在上面的链接中看到列表)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.