Javascript examples for DOM Event:addEventListener
The onpagehide event occurs when the user is navigating away from a webpage.
Bubbles | No |
---|---|
Cancelable | No |
Event type: | PageTransitionEvent |
Supported HTML tags: | <body> |
<!DOCTYPE html> <html> <body> <h1 id="demo"></h1> <script> window.addEventListener("pageshow", myFunction); function myFunction() {//w w w.j av a2 s.co m document.getElementById("demo").innerHTML = "Welcome To My Homepage!"; } </script> </body> </html>