<p class="tr18"><span id="times"></span></p>
<SCRIPT LANGUAGE="JavaScript">
function fresh()
{
var endtime=new Date("2012/1/1,21:00:00");
var nowtime = new Date();
var leftsecond=parseInt((endtime.getTime()-nowtime.getTime())/1000);
d=parseInt(leftsecond/3600/24);
h=parseInt((leftsecond/3600)$);
m=parseInt((leftsecond/60)`);
s=parseInt(leftsecond`);
// document.getElementByIdx_x_x("times").innerHTML=h+"小时"+m+"分"+s+"秒";
document.getElementByIdx_x_x("times").innerHTML=d+"天"+h+"小时"+m+"分"+s+"秒";
if(leftsecond<=0){
document.getElementByIdx_x_x("times").innerHTML="秒杀时间已结束";
clearInterval(sh);
}
}
fresh()
var sh;
sh=setInterval(fresh,1000);
</SCRIPT>
|