Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<p>Use the addEventListener() method to attach a "pageshow" event to the window object.</p>
<h1 id="demo"></h1>
<script>
window.addEventListener("pageshow", myFunction);
function myFunction() {
  document.getElementById("demo").innerHTML = "Welcome To My Homepage!";
}
</script>
</body>
</html>