<!doctype html><html><head><meta charset="utf-8"><title>jQuery实现倒计时重新发送短信验证码功能示例-</title><script src="/jquery/1.11.3/jquery.min.js"></script><style></style></head><body><input type="button" id="btn" value="免费获取验证码" onclick="settime(this)"><script>var countdown=60;function settime(obj) {if (countdown == 0) {obj.removeAttribute("disabled");obj.value="免费获取验证码";countdown = 60;return;} else {obj.setAttribute("disabled", true);obj.value="重新发送(" + countdown + ")";countdown--;}setTimeout(function() {settime(obj) },1000)}</script></body></html>
600字范文,内容丰富有趣,生活中的好帮手!