Webb26 apr. 2024 · Scripts may close only the windows that were opened by it. とconsoleに表示されて、閉じてくれません。 FireFoxでも スクリプトはスクリプトによって開かれたウィンドウ以外を閉じることができません。 と表示されて閉じないです。 Edgeでは閉じます。 なにか改善策があれば教えていただきたいです。 よろしくお願いいたします。 … Webb16 jan. 2010 · Firefox has an advanced setting that you can enable to allow scripts to close windows, effectively enabling the window.close() method. To enable this setting go to …
How to close current tab in a browser window? - Stack Overflow
WebbNetscape 7.2 - will refuse to close the window for the first 2 buttons (javascript console will notify "Scripts may not close windows that were not opened by script."), will report an uncaught exception regarding conversion of JavaScript argument arg 0 in the javascript console for the 3rd button and will close the window without a prompt for the 4th button. Webb21 jan. 2024 · If your script did not initiate opening the window (with something like window.open), then the script in that window is not allowed to close it. Its a security to prevent a website taking control of your browser and closing windows. Solution 3 You can't close a current window or any window or page that is opened using '_self' But you can do … chipperfield drive
[Solved] window.close() doesn
WebbScripts may only close windows were originally opened by script. So in your specific example, the popup was opened by a script, but the opener was opened by a user, and therefore the opener cannot be closed by either itself or the popup. Imagine a scenario where there are two popups. User-opened tab (cannot be closed) Popup 1 (opener is … WebbThis help content & information General Help Center experience. Search. Clear search Webb14 mars 2024 · 浏览器也给出了提示 Scripts may close only the windows that were opened by it.大概意思是脚本只能关闭它所打开的窗口,那这样的话,怎样才能关闭我当前页面呢. window.opener = null; window.open("", "_self", ""); window.close(); chipperfield entertainments