js倒计时
来源:互联网 发布:卢松松博客模板php 编辑:程序博客网 时间:2024/06/06 18:29
<input type="button" id="btn" value="免费获取验证码" />
<script type="text/javascript">
var wait=60;
function time(o) {
if (wait == 0) {
o.removeAttribute("disabled");
o.value="免费获取验证码";
wait = 60;
} else {
o.setAttribute("disabled", true);
o.value="重新发送(" + wait + ")";
wait--;
setTimeout(function() {
time(o)
},
1000)
}
}
document.getElementById("btn").onclick=function(){time(this);}
</script>
<script type="text/javascript">
var wait=60;
function time(o) {
if (wait == 0) {
o.removeAttribute("disabled");
o.value="免费获取验证码";
wait = 60;
} else {
o.setAttribute("disabled", true);
o.value="重新发送(" + wait + ")";
wait--;
setTimeout(function() {
time(o)
},
1000)
}
}
document.getElementById("btn").onclick=function(){time(this);}
</script>
0 0
- js 倒计时
- 倒计时js
- 倒计时js
- JS倒计时
- js 倒计时
- js 倒计时
- js倒计时
- js 倒计时
- JS倒计时
- js 倒计时
- js倒计时。
- js倒计时
- js倒计时
- JS倒计时
- JS倒计时
- js倒计时
- js 倒计时
- js倒计时
- PESCMS DOC 搭建
- 微信公众平台开发入门教程
- 【CodeVS】2597 团伙
- 三元表达式
- 漫天雪花效果
- js倒计时
- 性能监视器
- iptables 设置
- Hive hiveserver2
- Xamarin开发Android之创建一个项目并调试
- 更新SDK后出现项目报错
- 手势的3个容易混淆的属性 cancelsTouchesInView/delaysTouchesBegan/delaysTouchesEnded
- 自学adb命令
- ubuntu14.04下caffe配置全程指南