Javascript examples for DOM Event:addEventListener
The onpageshow event occurs when a user navigates to a webpage.
Bubbles | No |
---|---|
Cancelable | No |
Supported HTML tags: | <body> |
<!DOCTYPE html> <html> <body> <h1 id="demo"></h1> <script> window.addEventListener("pageshow", myFunction); function myFunction() {/*ww w.java2s. com*/ document.getElementById("demo").innerHTML = "Welcome To My Homepage!"; } </script> </body> </html>