日期:2014-05-17  浏览次数:20704 次

倒计时Html javaScript

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>cha0</title>
</head>

<body  bgColor="black" align="center">



<FONT style="FONT-SIZE: 20pt; FILTER: shadow(color=#13467F,strength=8); WIDTH: 100%; COLOR: #D5E7F5; LINE-HEIGHT: 160%; FONT-FAMILY: 隶书">
距离2011年6月2日还有:           
  <br>
<span id="span_dt_dt" ></span>
<SCRIPT language=javascript>
<!--
//document.write("");

function show_date_time(){
window.setTimeout("show_date_time()", 1000);
BirthDay=new Date("06-02-2011");//日期6月2日
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="还有"+daysold+"天"+hrsold+"小时"+minsold+"分"+seconds+"秒"+"!" ;

}

show_date_time();

//-->
</SCRIPT> </FONT>

</td>





</body>

</html>