您的位置:首页 > Web前端 > JavaScript

js验证码倒计时

2015-06-26 17:23 555 查看
var wait=59;

function time(){

if(wait >= 0){
$("#buttons").val("" + wait + "s重新发送");
wait--;
setTimeout(function() {
time()

},1000)
}else{

$("#buttons").hide();

$("#button").show();

wait=59;

}
};

$("#button").click(function(){

$(this).hide();

$("#buttons").show();

time()

});


  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: