Detect window closing event in Gecko based browser
How to detect window closing event when user press Alt+F4 or using javascript window.c开发者_如何学Pythonlose() in Gecko based browsers?
window.onbeforeunload =function(){return '';}
.......
window.onunload = function(){
alert('I am getting closed !!');
};
精彩评论