0

I needed to pop up a message on the event of closing the browser.I got many solutions in this site.Though the following code is suggested and verified , it works with Chrome and Opera but does not work with Firefox. Is there anything i am missing in execution ? Need Help. Thanks in Advance

<html>
<body>
<script type="text/javascript">
window.onbeforeunload = function (e) {
var message = "Message to Show",
e = e || window.event;

if (e) {
e.returnValue = message;
}

return message;
};
</script>
</body>
</html>
rahman_akon18
  • 336
  • 3
  • 14

0 Answers0