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

后端 未结 16 2137
孤城傲影
孤城傲影 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:09

    I found a new way that works for me perfetly

    var win = window.open("about:blank", "_self");
    win.close();
    

提交回复
热议问题