function showtime() {
fun_timedown(5);
}
function fun_timedown(time) {
$("#timedown").val(time + "秒");
time = time - 1;
if (time >= 0) {
$("#timedown").attr("disabled", "disabled");
setTimeout("fun_timedown(" + time + ")", 1000); } else { alert('倒计时结束啦'); }
}
 <input type="button" id="timedown" value="确定"/>
<a href="javascript:showtime()">点击</a>

js 倒计时 button不可用的更多相关文章

  1. 常见JS倒计时

    https://www.jb51.net/Special/356.htm  //JS倒计时  <button onclick="resetTime(60)">启动倒计时 ...

  2. js倒计时-倒计输入的时间

    计算指定时间到指定时间之间相差多少天.时.分.秒. 节日.活动.商城常用. 原理: 主要使用到时间戳,也就是从1970 年 1 月 1 日 到指定时间的毫秒数. 1. 求出毫秒差 :当两个时间直接进行 ...

  3. js 倒计时(可自定义时间)

    <html> <head> <title>js 倒计时</title> </head> <body> <div> & ...

  4. js 倒计时跳转

    用js实现简单的倒计时结束页面跳转效果,主要用到setInterval()和clearInterval()方法,页面跳转使用window.location.href = " ".倒 ...

  5. js倒计时显示

    <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>j ...

  6. Js倒计时程序

    Js倒计时程序 点击下载

  7. JS倒计时网页自动跳转代码

    <title>JS倒计时网页自动跳转代码</title> <script language="JavaScript" type="text/ ...

  8. JS倒计时 代码

    JS倒计时 代码 <div> <span id="KSD">3</span>天 <span id="KSH">1 ...

  9. Ext JS中Button的一般使用

    Ext JS中Button按钮的显示,以及按钮的部分事件 一.属性 renderTo:将当前对象所生成的HTML对象存放在指定的对象中 text:得到按钮名称 minWidth:按钮最小宽度 hidd ...

随机推荐

  1. C# String.Format

    C 货币 string.Format("{0:C3}", 2) $2.000 D 十进制 string.Format("{0:D3}", 2) 002 E 科学 ...

  2. codeforces Gym 100187H H. Mysterious Photos 水题

    H. Mysterious Photos Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100187/p ...

  3. cocos2d-x 3.1.1 学习笔记[3]Action 动作

    这些动画貌似都非常多的样子,就所有都创建一次. 代码例如以下: /* 动画*/ auto sp = Sprite::create("card_bg_big_26.jpg"); Si ...

  4. 如何在XAF中显示自定义窗体和控件

    https://www.devexpress.com/Support/Center/Example/Details/E911

  5. 凸包---HDU 2202

    题意:给N个点,求着N个点中选择三个联的最大的三角形面积! 注意精度:不然OJ上面会超时的 #include<iostream> #include<cmath> #includ ...

  6. [MongoDB] Insert, find -- 1

    MongoDB is JSON Document: How to start MongoDB client: mongod //start the server mongo // start the ...

  7. except ShortInputException,x中逗号

    class ShortInputException(Exception): def __init__(self, length, atleast): Exception.__init__(self) ...

  8. C#的System.ICloneable接口说明

    System.ICloneable接口支持克隆,即用与现有实例相同的值创建类的新实例.msdn上的解释很简单,主要就是clone方法的实行,介绍深拷贝和浅拷贝,搞的很糊涂,那么到底是什么意思呢?看看下 ...

  9. hdu1050 Moving Tables

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=1050 求区间上点的最大重叠次数. #include <stdio.h> #include &l ...

  10. 重置kafka的offset

    如果你在使用Kafka来分发消息,在数据处理的过程中可能会出现处理程序出异常或者是其它的错误,会造成数据丢失或不一致.这个时候你也许会想要通过kafka把数据从新处理一遍,我们知道kafka默认会在磁 ...