JavaScript redirect countdown timer
Hi Friends today we are going to learn countdown redirection in JavaScript..in this Script Timer Start from 10 seconds..after countdown codes to zero..
javascript redirect countdown timer |
redirection.php
<html> <head> <script type="text/javascript"> function redirect() { var count = 10; setInterval(function() { document.getElementById('countdown').innerHTML = "Redirect In <b style=color:red>"+count+"</b> Seconds..."; if (count < 0) { window.location = 'http://codenair.com'; } count--; },1000); } </script> </head> <body> <div id="content"> <input type="button" value="Click To Redirect" onclick="redirect();"> <p id="countdown"></p> </div> </body> </html>
That's it friends how to countdown Redirection in JavaScript..Thank You for Visiting...
No comments:
Post a Comment
Thank You for Your Comment
Note: Only a member of this blog may post a comment.