Thursday 10 March 2016

Use Javascript for custom reload and close browser tab event ....!!

<!DOCTYPE html>
<html>
<body  >

<p>Close this window, press F5 or click on the link below to invoke the onbeforeunload event.</p>

<a href="http://plateofcode.blogspot.in/">Click here </a>
      
<script>
window.onbeforeunload =function(){
  return "Write something here...";
};

</script>

</body>
</html>


 

It will work when you close or reload blog....!!!!



Close this window, press F5 or click on the link below to invoke the onbeforeunload event.
Click here to go to w3schools.com

No comments:

Post a Comment