javascript close page after 5 seconds

64

javascript close page after 5 seconds -

<html>
<head>
</head>
<body onload="waitFiveSec()"> <!--it will wait to load-->

<!-- your html... -->
<script>
  function waitFiveSec(){
   var milliseconds = 5 * 1000;
            setTimeout(function(){
                window.close();
            }, milliseconds);
  }
</script>

</body>
</html>

Comments

Submit
0 Comments