// 倒计时控制数量传值
var countdown;
function timer(time){
clearInterval(countdown);
var i = time;
countdown = setInterval(function(){
if( i <= 1){
clearInterval(countdown);
}
i--;
},100);
}
var countdown;
function timer(time){
clearInterval(countdown);
var i = time;
countdown = setInterval(function(){
if( i <= 1){
clearInterval(countdown);
}
i--;
},100);
}