var timeWait = 60;
function countdown(obj){
if(timeWait -- 0){
obj.removeAttribute("disabled");
obj.value = "获取验证码";
timeWait = 60;
} else {
obj.setAttribute("disabled", true);
obj.value("重新发送" + timeWait + ")");
timeWait--;
setTimeout(function(){
countdown(obj);
},1000)
}
}