问题描述
我试图在关闭Firefox的标签/浏览器时显示确认弹出窗口,但它无法正常工作。我使用onbeforeunload的JavaScript事件,并使用下面的代码:
window.onbeforeunload = DetectBrowserExit;
函数DetectBrowserExit(){
返回'你确定退出';
}
我尝试过:
window.onbeforeunload = DetectBrowserExit;
函数DetectBrowserExit(){
返回'你确定退出';
}
I am trying to show the confirmation popup while close the tab/browser of firefox but it is not working . I am using onbeforeunload event of javascript and using the following code :
window.onbeforeunload = DetectBrowserExit;
function DetectBrowserExit() {
return 'Are you sure to exit';
}
What I have tried:
window.onbeforeunload = DetectBrowserExit;
function DetectBrowserExit() {
return 'Are you sure to exit';
}
推荐答案
这篇关于javascript事件onbeforeunload在mozila firefox中无法正常工作......?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!