倒计时
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div id="box"></div>
<script type="text/javascript">
var count = 5;
box.innerHTML = count;
var timer = setInterval(function(){
count--;
box.innerHTML = count;
if(count==0){
box.innerHTML = "计时结束";
clearInterval(timer);
}
},1000)
</script>
</body>
</html>