相信有人用得上,呵呵,贴出来共都有了,现在用到离过年还有多长时间的代码,具全时间你们可以自己改下代码!
<p align="center">
<b><align=center><font color=#FF0000>春节倒计时</font></b><font color="#FF0000">
</font>
<span id="span_dt_dt" style='align=center no:1px solid black;background-color:#FFFFFF' ></span>
<font color="#FF0000">
<SCRIPT language=javascript>
<!--
//document.write("");
function show_date_time(){
window.setTimeout("show_date_time()", 1000);
BirthDay=new Date("2-17-2007");//这个日期是可以修改的
today=new Date();
timeold=(BirthDay.getTime()-today.getTime());
sectimeold=timeold/1000
secondsold=Math.floor(sectimeold);
msPerDay=24*60*60*1000
e_daysold=timeold/msPerDay
daysold=Math.floor(e_daysold);
e_hrsold=(e_daysold-daysold)*24;
hrsold=Math.floor(e_hrsold);
e_minsold=(e_hrsold-hrsold)*60;
minsold=Math.floor((e_hrsold-hrsold)*60);
seconds=Math.floor((e_minsold-minsold)*60);
span_dt_dt.innerHTML="<b><align=center><font color=00CC00>"+daysold+"天"+hrsold+"小时"+minsold+"分"+seconds+"秒"+"</b><br></font>" ;
}
show_date_time();
//-->
</SCRIPT>