Tuesday, October 21, 2008

Simple Countdown Timer - JavaScript

function countDown(){
countDownTime = countDownTime - 1;
if (countDownTime <=0){         
// What ever the event that you want to trigger         
// when the countdown is finish comes here         
document.getElementById('count_down_span').innerHTML = countDownTime;        
counter=setTimeout("countDown()", 1000); 
the count down will be displayed inside the tag which shown below, and you shold include that in the place where you want in the HTML

No comments: