当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - window.close in FireFox

问题描述:

With the latest update from Firefox I am no longer able to close a page with javascript when a customer clicks the close button on the screen. Below is what I have been using in the past and I can't seem to find an alternative solution. Any idea?

var response = confirm('The webpage you are viewing is trying to close the window.\n\nDo you want to close the window?');

if (response) {

window.open('', '_self');

window.close();

}

分享给朋友:
您可能感兴趣的文章:
随机阅读: