Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #close #page #seconds
ADD COMMENT
Topic
Name
5+4 =