//倒计时 顺手小练习
var time = 180;
t = setInterval(function () {
time--;
if (time <= 0) {
clearInterval(t);
return;
}
Time(time);
}, 1000);
function Time(time) {
var min = '0' + Math.floor(time / 60);
$('.min').html(min);
time = time % 60;
var ss = Math.floor(time) > 9 ? Math.floor(time) : '0' + Math.floor(time);
$('.second').html(ss);
}