Close Event In Javascript For Firefox, IE and Chrome
Hi guys here is the event that gets triggered when ever a browser [Internet Explorer, Firefox, Chrome] is closed.
Its very simple just check out the script
<html>
<body>
<script type=”text/javascript”>
window.onbeforeunload = check;
function check()
{
return “Are you sure you want to exit this page?”;
//or put whatever function you need to call when a user closes the web //browser.
}
</script>
</body>
</html>
Hope you guys got it!!!!appreciate your comments.
Related posts:
- Close Event In Javascript Using OnUnload()
- Add to favorites or bookmarking using javascript in firefox and internet explore [IE]
- Using no-cache for Stop Caching in Firefox and Internet Explorer
- Javascript setTimeout() Tricks
- Adding a draggable div along with the cursor using simple javascript
- How to close a child window from a parent window using javascript
- “Header already sent” in php error and other use of Header function in PHP
