Test setTimeout function - Javascript Browser Object Model

Javascript examples for Browser Object Model:Window setInterval

Description

Test setTimeout function

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.8.3.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){//from  w  w w .  j ava 2 s.  c om
 var yes=0;
    setInterval(function () {
        console.log(yes);
        yes++;
    }, 1000);
    });

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials