Javascript examples for DOM Event:Element Event Attribute
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> document.getElementsByTagName("BODY")[0].onpageshow = function() {myFunction()}; function myFunction() {/*from ww w . j a va 2 s . com*/ document.getElementById("demo").innerHTML = "Welcome To My Homepage!"; }; </script> </body> </html>