Jquery 定时器
来源:互联网 发布:linux 查看阵列卡 编辑:程序博客网 时间:2024/04/29 15:10
<head runat="server">
<title></title>
<script src="Js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
});
var interval;
function fInterval() {
var currTime = (new Date()).valueOf();
var diftime = currTime - parseInt($("#AcceptTime").val(), 10);
if (diftime < 5 * 1000) {
//隐藏按钮
$("#GetMsg").attr("style", "display:none");
$("#timeTip").attr("style", "display:block");
$("#timeTip").html("请在" + Math.floor((5 * 1000 - diftime) / 1000) + "秒后重新获取验证码!");
return;
}
else {
if (interval != null) {
clearInterval(interval);
}
$("#GetMsg").attr("style", "display:block");
$("#timeTip").attr("style", "display:none");
}
}
function SentCaptcha() {
$("#AcceptTime").val((new Date()).valueOf());
interval = setInterval(fInterval, 1000);
}
</script>
</head>
<body>
<div>
<input type="button" id="GetMsg" value="获取验证码" onclick="SentCaptcha()" style="display:block;" />
<div id="timeTip" style="display: none;"> </div>
<input type="hidden" id="AcceptTime" />
</div>
</body>
- jquery定时器
- Jquery 定时器
- Jquery 定时器
- jQuery定时器
- jquery定时器
- JQuery定时器
- jquery 定时器
- JQuery定时器
- JQuery定时器(jQuery Timers)
- jQuery定时器插件:jQuery Timers
- jquery.countdown定时器
- jquery 定时器控制
- jquery 定时器的使用
- jquery动画(定时器)
- jquery实现定时器
- jquery setInterval() 定时器用法
- jQuery ajax定时器
- jquery定时器封装
- UVa 10382 - Watering Grass(贪心算法,区间覆盖问题)
- Class.forName的作用以及为什么要用它【转】
- C语言笔试题带答案(十)
- Android iew 的onTouch事件中,长按、左右滑动和点击判断
- js关闭子窗口刷新父窗口
- Jquery 定时器
- 基于WPF的Dispatcher应用及探讨(四)
- dos2unix(windows脚本文件放到unix下运行要注意)
- Apache Tez DAG计算应用框架
- Log4j配置
- 推送
- hbase shell 总结 (待续)
- android 退出整个应用
- memcached+Mysql(主从)