Detect browser close in jquery/javascript for cross browser -
this question has reply here:
want observe browser close event? 3 answerswindow.onbeforeunload / window.onunload not working in chrome detecting browser close event. need help!
check http://help.dottoro.com/ljhtbtum.php
example http://help.dottoro.com/external/examples/ljhtbtum/onbeforeunload_1.htm
code
<head> <script type="text/javascript"> function onbeforeunload () { homecoming "all info have entered lost!"; } </script> </head> <body onbeforeunload="return onbeforeunload ()"> <b>close window or press f5 reload page.</b> <br /><br /> <form> user name: <input type="text" name="username" /> <br /> city: <input type="text" name="city" /> </form> </body>
javascript jquery asp.net
No comments:
Post a Comment