<!--倒计时脚本 star-->
var outTime = null, number = 60;
$("#djsTime").click(function () {
//倒计时
var CountDown = $(".CountDown");
if (outTime) {
window.clearInterval(outTime);
outTime = null;
number = 60;
CountDown.text(number);
}
outTime = window.setInterval(function () {
if (number > 0) {
number--;
CountDown.text(number);
} else {
number = 0;
window.clearInterval(outTime);
CountDown.text("重新发送");
outTime = null;
}
}, 1000);
});
<!--倒计时脚本 end-->