Recent Posts

This Post Has Been Viewed 215 Times.

Close Event In Javascript For Firefox, IE and Chrome

Posted by admin | Posted in Html, JavaScripts | Posted on 20-06-2009

0

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.

VN:F [1.5.7_846]
Rating: 0.0/10 (0 votes cast)
VN:F [1.5.7_846]
Rating: 0 (from 2 votes)
Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • De.lirio.us
  • Xerpi

Related posts:

  1. Close Event In Javascript Using OnUnload()
  2. Add to favorites or bookmarking using javascript in firefox and internet explore [IE]
  3. Adding and removing child nodes using javascript and DOM
  4. Using no-cache for Stop Caching in Firefox and Internet Explorer
  5. How to close a child window from a parent window using javascript
  6. Adding a draggable div along with the cursor using simple javascript

Write a comment

Spam Protected