1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | <!DOCTYPE html> <html> <head> <meta charset= "utf-8" > <meta name= "viewport" content= "width=device-width, initial-scale=1.0" > <title>Redirect page delay 5 second using JavaScript</title> <script> function delayRedirect(){ document.getElementById( 'delayMsg' ).innerHTML = 'Please wait you\'ll be redirected after <span id="countDown">5</span> seconds....' ; var count = 5; setInterval( function (){ count --; document.getElementById( 'countDown' ).innerHTML = count ; if ( count == 0) { } },1000); } </script> </head> <body> <div class = "container" > <div class = "row" > <div class = "col-lg-12" > <div class = "div-center" > <div id= "delayMsg" style= "margin-bottom:10px;" ></div> <input type= "button" onclick= "delayRedirect()" value= "Click to Redirect" /> </div> </div> </div> </div> </body> </html> |
article
Saturday, April 22, 2017
Redirect page delay 5 second using JavaScript
Redirect page delay 5 second using JavaScript