window.onbeforeunload = function (e) {
e = e || window.event;
// For IE and Firefox prior to version 4
if (e) {
e.returnValue = 'Any string';
}
// For Safari
return 'Any string';
};
I tried this code for display the warning message when a user leaving / closing the tab / window in from the browser. This code is works in the chrome very well but in the Firefox will not work properly and even doesn't show the message also.
Please help me.
How to display the confirmation message on Firefox browser.
Thanks in advance.