//计时开始的方法
function countStart(){
var seconds = arguments[0];//倒计时方法中的当前时间
console.log(seconds )
}
//计时结束的方法
function countStop(){
console.log("stop")
}
//倒计时方法
function setTimeCountDown(seconds,countStart,countStop){
seconds --;
debugger;
if(seconds == 0){
if(countStop!= null && typeof countStop== 'function'){
countStop.call(null)
}
return false;
}
if(countStart != null && typeof countStart== 'function'){
countStart.call(null,seconds)
}
var t = setTimeout("setTimeCountDown("+seconds+","+countStart+","+countStop+")", 1000);
}
//60秒倒计时
setTimeCountDown(60,countStart,countStop);