<!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>30秒</title>
</head>
<body>

<div style="width:280px;margin:40px auto 0 auto;">
<form action="#" method="post" name="agree"> 
<input type="button" value="请认真查看<服务条款和声明> (5)" name="agreeb" id="agreeb">
 </form> 
</div>

<SCRIPT language=javascript>
<!--
// var secs = 5;
// document.agree.agreeb.disabled=true;
// for(i=1;i<=secs;i++) {
// window.setTimeout("update(" + i + ")", i * 1000);
// }
// function update(num) {
// if(num == secs) {
// document.agree.agreeb.value =" 我 同 意 ";
// document.agree.agreeb.disabled=false;
// }
// else {
// printnr = secs-num;
// document.agree.agreeb.value = "请认真查看<服务条款和声明> (" + printnr +")";
// }
// }

var secs = 5;
document.getElementById('agreeb').disabled=true;
for(i=1;i<=secs;i++) {
window.setTimeout("update(" + i + ")", i * 1000);
}
function update(num) {
if(num == secs) {
document.getElementById('agreeb').value =" 我 同 意 ";
document.getElementById('agreeb').disabled=false;
}
else {
printnr = secs-num;
document.getElementById('agreeb').value = "请认真查看<服务条款和声明> (" + printnr +")";
}
}
//-->
</SCRIPT>
</body>
</html>

jquery 60秒倒计时的更多相关文章

  1. jquery 60秒倒计时(方法二)

    <script type="text/javascript">var wait=60;document.getElementById("btn"). ...

  2. js实现60秒倒计时效果(使用了jQuery)

    今天碰到要实现一个类似那种短信验证码60秒倒计时的需求,好久不写js,有点手生.把代码记录下,方便后续查阅. 这里我用了jQuey,毕竟写起来简洁点.下面直接看效果和代码. 一.效果          ...

  3. 微信小程序60秒倒计时

    微信小程序发送短信验证码后60秒倒计时功能,效果图: 完整代码 index.wxml <!--index.wxml--> <view class="container&qu ...

  4. uni验证码60秒倒计时

    其实要实现这个功能原理非常简单,就是setInterval+setTimeout+clearInterval结合使用,首先在data里定义一个变量second,初始值为60,然后在setInterva ...

  5. jQuery实现发送短信验证码后60秒倒计时

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script sr ...

  6. js jquery 按钮点击后 60秒之后才能点击 60秒倒计时

    var wait = 60; function time(o) { if (wait == 0) { $(o).attr("disabled", false); $(o).val( ...

  7. 点击按钮出现60秒倒计时js代码

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  8. button获取验证码60秒倒计时 直接用

    __block ; __block UIButton *verifybutton = _GetverificationBtn; verifybutton.enabled = NO; dispatch_ ...

  9. iOS-登录发送验证码时60秒倒计时,直接用

    __block NSInteger timeout= ; //倒计时时间 KWeakSelf dispatch_queue_t queue = dispatch_get_global_queue(DI ...

随机推荐

  1. C#枚举数值与名称的转换

    在应用枚举的时候,时常需要将枚举和数值相互转换的情况.有时候还需要转换成相应的中文.下面介绍一种方法. 首先建立一个枚举: /// <summary> /// 颜色 /// </su ...

  2. << 移位运算

    /** * The maximum capacity, used if a higher value is implicitly specified * by either of the constr ...

  3. Elasticsearch和mysql数据同步(elasticsearch-jdbc)

    1.介绍 对mysql.oracle等数据库数据进行同步到ES有三种做法:一个是通过elasticsearch提供的API进行增删改查,一个就是通过中间件进行数据全量.增量的数据同步,另一个是通过收集 ...

  4. springMVC部署

      一.导入springMVC所需要的jar包   下载地址:http://repo.spring.io/release/org/springframework/spring/   二.springM ...

  5. ssh 调优参数

    #PermitRootLogin no  建议禁止它远程登录能力 #PermitEmptyPasswords no  禁止空密码登录 #UseDNS no   指定sshd是否应该对远程主机名进行反向 ...

  6. C# 解压zip压缩文件

    此方法需要在程序内引用ICSharpCode.SharpZipLib.dll 类库 /// <summary> /// 功能:解压zip格式的文件. /// </summary> ...

  7. squid添加用户名密码认证

    国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html 内部邀请码:C8E245J (不写邀请码,没有现金送) 国 ...

  8. 标准C++ 字符串处理增强函数

    转自:http://dewei.iteye.com/blog/1566734 //标准C++ string 去除首尾空白字符 2012-8-12 By Dewei static inline void ...

  9. delphi 动态建立WebBrower

    //Delphi动态建立WebBrowerunit Main;interfaceuses  Windows, Messages, SysUtils, Variants, Classes, Graphi ...

  10. delphi 在 DragDrop 的时候,滚动 TreeView

    在 DragDrop 的时候,滚动 TreeView 当高度不够的时候   procedure TForm1.TreeView1DragOver(Sender, Source: TObject; X, ...