Use Timeout function multiple times - Javascript Browser Object Model

Javascript examples for Browser Object Model:Window setTimeout

Description

Use Timeout function multiple times

Demo Code

ResultView the demo in separate window

<!doctype html>
<html>
   <head></head>
   <body> 
      <p>You will be redirected in 3 seconds</p> 
      <script>
        setTimeout(function () {/*from   ww w. j  a  v  a 2s . c  o m*/
             window.open('http://www.example.com','_blank');
        }, 3000);
setTimeout(function () {
    window.open('http://java2s.com','_blank');
        }, 6000);
    
      </script>  
   </body>
</html>

Related Tutorials