Javascript examples for Browser Object Model:Window setTimeout
SetTimeout calls a method every 3 seconds
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w w w .jav a2 s.c om*/ function myfunction() { window.setTimeout(function() { console.log('I waited for you.') }, 3000); } myfunction(); } </script> </head> <body> </body> </html>