Posted By

fabienthomas on 08/24/10


Tagged

onunloadevent


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

roli000
seloh77


Prevent page leaving with javascript


 / Published in: JavaScript
 

  1. <script type="text/javascript"> window.onbeforeunload = function(e){ return 'En fermant cette page vous perdrez tout.'; } </script>

Report this snippet  

You need to login to post a comment.