window.close and self.close do not close the window in Chrome

后端 未结 16 1803
孤城傲影
孤城傲影 2020-11-21 05:48

The issue is that when I invoke window.close() or self.close() it doesn\'t close the window. Now there seems to be a belief that in Chrome you can\

16条回答
  •  独厮守ぢ
    2020-11-21 06:12

    If you can't close windows that aren't opened by the script, then you can destroy your page using this code:

     document.getElementsByTagName ('html') [0] .remove ();
    

提交回复
热议问题