<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<div class="time">
<span style="position:relative;top:45%;left:4.5%">距离活动开始时间:<span id="timer" style="color:;"></span></span>
</div>
<script language="javascript">
function getintveral()
{
var d1=new Date();
var d2=new Date(2015,11,24,23,59,59);
var t1=d1.getTime();
var t2=d2.getTime();
var t3=parseInt(parseInt(t2-t1)/1000);
var d=parseInt(t3/86400);
var h=parseInt((t3-(d*86400))/3600);
var m=parseInt((t3-(d*86400)-(h*3600))/60);
var s=parseInt(t3-(d*86400)-(h*3600)-(m*60));
timer.innerHTML=d+"天"+h+"小时"+m+"分"+s+"秒";
}
setInterval(getintveral,1000);
</script>
</body>
</html>