qq:2579679536
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>淘宝抢购</title>
</head>
<body>
<div id="str" onclick="newnum(this)">时间倒计时</div>
<script type="text/javascript">
str=document.getElementById('str');
ak=7200;
function newnum(j)
{
//res=parseInt(str.innerHTML)-1;
res=parseInt(ak)-1;
a=parseInt(res/3600);//a个小时
b=res-a*3600;
c=parseInt(b/60);//c个分钟
d=b-c*60;//d个小时
str.innerHTML=a+'小时'+c+'分钟'+d+'秒';
ak=a*3600+c*60+d;
//t=setInterval(newnum,1000);
}
//ak=a*3600+c*60+d;
t=setInterval(newnum,1000);
</script>
</body>
</html>