jquery 60秒倒计时
<!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秒倒计时的更多相关文章
- jquery 60秒倒计时(方法二)
<script type="text/javascript">var wait=60;document.getElementById("btn"). ...
- js实现60秒倒计时效果(使用了jQuery)
今天碰到要实现一个类似那种短信验证码60秒倒计时的需求,好久不写js,有点手生.把代码记录下,方便后续查阅. 这里我用了jQuey,毕竟写起来简洁点.下面直接看效果和代码. 一.效果 ...
- 微信小程序60秒倒计时
微信小程序发送短信验证码后60秒倒计时功能,效果图: 完整代码 index.wxml <!--index.wxml--> <view class="container&qu ...
- uni验证码60秒倒计时
其实要实现这个功能原理非常简单,就是setInterval+setTimeout+clearInterval结合使用,首先在data里定义一个变量second,初始值为60,然后在setInterva ...
- jQuery实现发送短信验证码后60秒倒计时
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script sr ...
- js jquery 按钮点击后 60秒之后才能点击 60秒倒计时
var wait = 60; function time(o) { if (wait == 0) { $(o).attr("disabled", false); $(o).val( ...
- 点击按钮出现60秒倒计时js代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- button获取验证码60秒倒计时 直接用
__block ; __block UIButton *verifybutton = _GetverificationBtn; verifybutton.enabled = NO; dispatch_ ...
- iOS-登录发送验证码时60秒倒计时,直接用
__block NSInteger timeout= ; //倒计时时间 KWeakSelf dispatch_queue_t queue = dispatch_get_global_queue(DI ...
随机推荐
- OLEVARIANT的替代——FIREDAC的TFDJSONDataSets和TFDJSONDeltas
OLEVARIANT——这个COM的序列格式,也是DATASNAP已使用了20年的序列格式,在20年以后的今天,终于有了它的替代者:FIREDAC的TFDJSONDataSets和TFDJSONDel ...
- 分析nginx access log日志的命令
统计访问最多的ip 1. tail -n 10000 xxaccess_log | cut -d " " -f 1 |sort|uniq -c|sort -rn|head -10 ...
- Java NIO原理和使用(转载一)
Java NIO非堵塞应用通常适用用在I/O读写等方面,我们知道,系统运行的性能瓶颈通常在I/O读写,包括对端口和文件的操作上,过去,在打开一个I/O通道后,read()将一直等待在端口一边读取字节内 ...
- javascript常见编程模式举例
近期买到手了一本<javascript框架设计>,具体介绍开发js框架所用到的知识.初读一点,乐帝脆弱的理论修养就暴露无遗了,所以专门加强理论修养,重看javascript编程模式的举例. ...
- HDU 4293 Groups (线性dp)
OJ题目:click here~~ 题目分析:n个人分为若干组 , 每一个人描写叙述其所在的组前面的人数和后面的人数.求这n个描写叙述中,最多正确的个数. 设dp[ i ] 为前i个人的描写叙述中最多 ...
- Android源码编译的全过程记录
写本篇文章主要参考了官方文档和网上的一些资料,但是对于Android最新的代码来说,网上资料有些已经过时.本文中步骤已经作者实验,大家可以亲自执行试试.由于没有使用Eclipse的习惯,所以没有做Ec ...
- Android中通过WebView控件实现与JavaScript方法相互调用的地图应用
在Android中通过WebView控件,可以实现要加载的页面与Android方法相互调用,我们要实现WebView中的addJavascriptInterface方法,这样html才能调用andro ...
- [AngularJS] Lazy loading Angular modules with ocLazyLoad
With the ocLazyLoad you can load AngularJS modules on demand. This is very handy for runtime loading ...
- [AngularJS] Html ngSanitize, $sce
Safely render arbitrary HTML snippets by using ngSanitize and $sce. By default angularJS consider us ...
- Jordan Lecture Note-10: Kernel Principal Components Analysis (KPCA).
Kernel Principal Components Analysis PCA实际上就是对原坐标进行正交变换,使得变换后的坐标之间相互无关,并且尽可能保留多的信息.但PCA所做的是线性变换,对于某些 ...