zoukankan      html  css  js  c++  java
  • 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="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>

  • 相关阅读:
    Redis string
    java 是 传值还是传址 Pass-by-value or Pass-by-reference
    IDEA 适用技巧
    测试 MD
    pyqt5 学习总结
    win10 安装anaconda 无法使用pip 报错缺少SSL模块
    Hadoop datanode无法启动
    Ansible 安装jdk
    java 安装后 不能 java javac 说找不到命令 -bash: javac: command not found
    如何去掉MapReduce输出的默认分隔符
  • 原文地址:https://www.cnblogs.com/roves/p/4877833.html
Copyright © 2011-2022 走看看