Javascript examples for Browser Object Model:Window setTimeout
Change CSS with Javascript after a second with setTimeout timer
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <div class="logindiv" style="display:none"> This is login div </div> <script> setTimeout(myTimer, 1000);//w ww . j av a2 s . co m function myTimer() { var elements = document.getElementsByClassName("logindiv"); for(i=0;i<elements.length;i++){ elements[i].style.display = "block"; } } </script> </body> </html>