Created
June 26, 2012 09:50
-
-
Save systemhalted/2994747 to your computer and use it in GitHub Desktop.
Code Snippet for performing certain tasks on browser close event
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<Title>fnPerformTasksOnUnload</Title> | |
<script> | |
function fnPerformTasksOnUnload(){ | |
alert("Thanks for visiting us! Visit us again soon!"); | |
} | |
</script> | |
</head> | |
<body onUnload="fnPerformTasksOnUnload()"> | |
Code Snippet for performing certain tasks on browser close event. | |
Just close the browser and check for yourself. | |
I have tested this on IE and Firefox and it works fine. | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment