<p>You'll be automatically redirected in <span id="count">10</span> seconds...</p>
<script type="text/javascript">
window.onload = function(){
(function(){
var counter = 10;
setInterval(function() {
counter--;
if (counter >= 0) {
span = document.getElementById("count");
span.innerHTML = counter;
}
// Display 'counter' wherever you want to display it.
if (counter === 0) {
alert('this is where it happens');
clearInterval(counter);
}
}, 1000);
})();
}
</script>
<meta http-equiv="refresh" content="10;url=http://www.example.com" />
Seconds Countdown timer with jquery
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment