I did not study the countdown effect, so I practiced it myself.
<! Doctype html > < Html > < Head > < Meta Charset = "UTF-8" > < Title > Countdown </ Title > < Meta Name = "Author" Content = "" > < Meta Name = "Keywords" Content = "" > < Meta Name = "Description" Content = "" > < Style Type = "Text/CSS" > * { Margin : 0 ; Padding : 0 ; } Ul, Li { List-style : None ; } # Show_time { Color : # F00 ; Font-size : 24px ; Font-weight : Bold ; } </ Style > </ Head > < Body > < Div ID = "Show_time" > </ Div > < Script Type = "Text/JavaScript" > Function Countdown (){ VaR Show_time = Document. getelementbyid ( " Show_time " ); Endtime = New Date ( " 12/31/2012 23:59:59 " ); // End Time Today = New Date (); // Current Time Delta_t = Endtime. gettime () - Today. gettime (); // Interval If (Delta_t < 0 ) {Clearinterval (auto); show_time.innerhtml = " Countdown has ended " ;} Window. setTimeout (countdown, 1000 ); Total_days = Delta_t / (24*60*60*1000 ); // Total days Total_show = Math. Floor (total_days ); // Actual Number of days displayed Total_hours = (Total_days - Total_show) * 24 ; // Remaining hours Hours_show = Math. Floor (total_hours ); // Actual displayed hours Total_minutes = (Total_hours - Hours_show) * 60 ; // Remaining minutes Minutes_show = Math. Floor (total_minutes ); // Actually displayed minutes Total_seconds = (Total_minutes - Minutes_show) * 60 ; // Remaining minutes Seconds_show = Math. Floor (total_seconds ); // Number of seconds actually displayed Show_time.innerhtml = " There are also: " + Total_show + " Days " + Hours_show + " Hour " + Minutes_show + " Minute " + Seconds_show + " Seconds " ;} Countdown (); </ Script > </ Body > </ Html >