Friday, 15 February 2013

onunload event of JAVASCRIPT not work in Linux Firefox -



onunload event of JAVASCRIPT not work in Linux Firefox -

can help me problem . using modzilla firefox in linux . when close window or reload page onunload event sees not work

<html> <head> <title>onunload test</title> <script type="text/javascript"> window.onunload = unloadpage; function unloadpage() { alert("unload event detected!"); } </script> </head> <body> <p>reload new page browser<br /> fire unload event page.</p> <p>you can utilize or forwards buttons<br /> load new page , fire event.</p> </body>

try code snippet :

window.onbeforeunload = function(){ homecoming 'are sure want leave?'; // or want };

javascript javascript-events

No comments:

Post a Comment