HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The onpageshow event occurs when a user navigates to a webpage."
The onpageshow event occurs when a user navigates to a webpage.
The onpageshow event is similar to the onload event, except that it occurs after the onload event when the page first loads. Also, the onpageshow event occurs every time the page is loaded, whereas the onload event does not occur when the page is loaded from the cache.
The onpageshow attribute is part of the Event Attributes, and can be used on the following element:
Elements | Event |
---|---|
<body> | onpageshow |
Execute a JavaScript when a user navigates to a webpage:
<body onpageshow="myFunction()">
The numbers in the table specify the first browser version that fully supports the event attribute.
Event Attribute | |||||
---|---|---|---|---|---|
onpageshow | Yes | 11.0 | Yes | 5.0 | Yes |