Countdown
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd" ><html><head><meta http-equiv="Content-type" Content="text/html; Charset=utf-8 "><title>New Year Countdown</title> <style type = "text/css" ; #msg{ text-align: center; font-size: px; }#timer{ font-size: px; color: red; } </style> <script type="Text/javascript"> function showTime(){ varCurrenttime=New Date();varEndtime=New Date("2015/2/13");varRemaintime=endtime.gettime ()-currenttime.gettime ();//1 days = 24 hours 1 hours = 60 Minutes 1 minutes = 60 seconds 1 seconds =1000 milliseconds varday=Math. Floor (remaintime/( -* -* -* +));varHour=Math. Floor ((remaintime-day* -* -* -* +)/( -* -* +));varMinute=Math. Floor ((remaintime-day* -* -* -* +-hour* -* -* +)/( -* +));varSecond=Math. Floor ((remaintime-day* -* -* -* +-hour* -* -* +-minute* -* +)/( +));if(remaintime<0) {document.getElementById ("MSG"). innerhtml="New Year's Day is over!" "; }Else{vartime=day+"Day"+hour+"When"+minute+"Min"+second+"Seconds! "; document.getElementById ("Timer"). Innerhtml=time; }} setinterval ("ShowTime ()", +);</script></head><body> <div id="msg">From the net Bo holiday also:<br/><span id="Timer"></span><br/>Be sure to HOLDER live!!!!</div></body></html>
JavaScript-Countdown instance (New Year, National Day, Mid-Autumn Festival countdown)