js倒计时代码

//60秒验证码倒计时

var wait=60;
function time(e) {
    if (wait == 0) {
        e.removeAttribute("disabled");
        e.value="重新获取";
        wait = 60;
    } else {
        e.setAttribute("disabled", true);
        e.value= + wait + "秒重新获取";
        wait--;
        setTimeout(function() {
            time(e)
        },1000)
    }
}


^