<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>倒计时</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<p>离2009元旦<span id="_lefttime" style="color:red;font-size:18pt;"></span></p>
<SCRIPT LANGUAGE="JavaScript">
function _fresh()
{
var endtime=new Date("January 1, 2011 00:00:00");
var nowtime = new Date();
var leftsecond=parseInt((endtime.getTime()-nowtime.getTime())/1000);
if(leftsecond<0){leftsecond=0;}
__d=parseInt(leftsecond/3600/24);
__h=parseInt((leftsecond/3600)%24);
__m=parseInt((leftsecond/60)%24);
__s=parseInt(leftsecond%60);
__all = __d+"天 "+__h+"小时"+__m+"分"+__s+"秒";
__all = __all.replace(/([0-9]{1})/g,'<img width="16" height="21" src="http://www.sinaimg.cn/blog/tmpl/v3/images/counter/2/$1.gif">')
document.getElementById("_lefttime").innerHTML=__all;
}
_fresh()
setInterval(_fresh,1000);
</SCRIPT>
<html>
<head>
<title>倒计时</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<p>离2009元旦<span id="_lefttime" style="color:red;font-size:18pt;"></span></p>
<SCRIPT LANGUAGE="JavaScript">
function _fresh()
{
var endtime=new Date("January 1, 2011 00:00:00");
var nowtime = new Date();
var leftsecond=parseInt((endtime.getTime()-nowtime.getTime())/1000);
if(leftsecond<0){leftsecond=0;}
__d=parseInt(leftsecond/3600/24);
__h=parseInt((leftsecond/3600)%24);
__m=parseInt((leftsecond/60)%24);
__s=parseInt(leftsecond%60);
__all = __d+"天 "+__h+"小时"+__m+"分"+__s+"秒";
__all = __all.replace(/([0-9]{1})/g,'<img width="16" height="21" src="http://www.sinaimg.cn/blog/tmpl/v3/images/counter/2/$1.gif">')
document.getElementById("_lefttime").innerHTML=__all;
}
_fresh()
setInterval(_fresh,1000);
</SCRIPT>