<body>
<h1>倒计时:<span>10</span></h1>
<script src="jquery-1.11.1.min.js"></script>
<script>
var i=10;
var timer=null;
timer=setInterval(function(){
i--;
console.log(i);
if(i<=0)
clearInterval(timer);
console.trace();
$("span").html(i);
},1000);
</script>
</body>