点击按钮出现60秒倒计时js代码
2016-11-25 20:10
190 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <script type="text/javascript" src="js/jquery.js"></script> </head> <body> <input type="button" id="btn" value="免费获取验证码" onclick="settime(this)" /> <script type="text/javascript"> var countdown=60; function settime(val) { if (countdown == 0) { val.removeAttribute("disabled"); val.value="免费获取验证码"; countdown = 60; } else { val.setAttribute("disabled", true); val.value="重新发送(" + countdown + ")"; countdown--; } setTimeout(function() { settime(val) },1000) } </script> </body> </html>
相关文章推荐
- js代码实现点击按钮出现60秒倒计时
- 点击按钮出现60秒倒计时js代码
- 点击按钮出现60秒倒计时的简单js代码(推荐)
- js代码实现点击按钮出现60秒倒计时
- 点击按钮出现60秒禁用倒计时js代码
- 点击按钮出现60秒倒计时js代码
- 点击按钮出现5秒倒计时js代码
- js jquery 按钮点击后 60秒之后才能点击 60秒倒计时
- 用户点击获取验证码之后我们会发送一条信息到用户手机,然后就会出现一个倒计时按钮,很像支付宝手机付款效果了,下面我给大家分享两个js效果
- [个人备份]js点击按钮进行60秒倒计时
- jquery 实现点击按钮后出现倒计时效果(用于实现发送手机验证码、邮箱验证码)
- 点击按钮,实现60秒倒计时效果(发送手机验证码)
- vue获取手机验证码60秒倒计时,不能点击按钮
- 点击一个按钮,弹出框出现几秒钟之后,跳转到另一个页面
- jQuery 实现 点击按钮后倒计时效果,多用于实现发送手机验证码、邮箱验证码
- jquery 实现 点击按钮后倒计时效果,多用于实现发送手机验证码、邮箱验证码
- 短信验证码按钮60秒倒计时
- Jquery 实现 点击按钮后倒计时效果,多用于实现发送手机验证码、邮箱验证码
- 倒计时恢复按钮点击
- 添加按钮图标并且当点击或者悬浮上面出现不同效果的代码