jQuery 60s倒计时
<input id="code" type="button" value="发送验证码" /> <script> var obj = $('#code'); obj.on('click', function () { var count = 6; var timer = setInterval(function () { obj.attr('disabled', true); obj.val(count); count--; if (count < 0) { clearInterval(timer); obj.val('发送验证码'); obj.attr('disabled', false); } }, 1000); }) </script>