1.

When the onresize event executed in JavaScript?

Answer»

<P>When a visitor leaves the web page, then the onpagehide event TRIGGERS. The visitor can move to another page or click a link after leaving the current web page. An example here displays an ALERT box when the user tries to leave the page. This happens since onpagehide event fires when the page is left: 

<!DOCTYPE html> <html> <body onpagehide="display()"> <p>Close the page</p> <script> FUNCTION display() {     alert("It was NICE having you here!"); } </script> </body> </html>


Discussion

No Comment Found