Replace ONCLICK to an automated action performed in interval of time - Javascript Browser Object Model

Javascript examples for Browser Object Model:Window setInterval

Description

Replace ONCLICK to an automated action performed in interval of time

Demo Code

ResultView the demo in separate window

<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 
      <script type="text/javascript">window.addEventListener('DOMContentLoaded',
    function(event) { setInterval(function() {
        console.log('you\'re OK');
    }, 1e4);//ww  w . j  av  a 2s . c o  m
}, false);
      </script>
   </head>
   <body></body>
</html>

Related Tutorials