zoukankan      html  css  js  c++  java
  • 过一定时间显示可用控件

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title></title>
        <script type="text/javascript">
            var time = 10;//指定要过多长时间
            function tranform()
            {    
                var btnagree = window.document.getElementById("IDagree");
                if (time > 0)
                {//在disabled的情况下继续操作控件,让他显示倒计时
                    btnagree.value = "同意(" + time + "s后继续)";
                    time--;
                }
                else {
                    btnagree.value = "同意";

               //够时间的情况下,要把控件的可用性打开
                    btnagree.disabled = false;

    //清除时间循环
                    clearInterval("timeID");        
                }
            }
            var timeID = setInterval("tranform()", 1000);
        </script>
    </head>
    <body onload="tranform()">

    //开始让控件不可用
        <input id="IDagree" type="button" value="同意" disabled="disabled" />
    </body>
    </html>

  • 相关阅读:
    约瑟夫环问题拓展 C/C++
    C/C++之STL简介
    详解约瑟夫环问题 C/C++
    HC-SR04超声波传感器
    TCRT5000 红外传感器
    win10的docker无法运行mysql的image,Public Key Retrieval is not allowed
    如何将docker默认的安装位置从C盘改为D盘?
    免费PDF阅读器
    A1B2B3
    动态代理
  • 原文地址:https://www.cnblogs.com/shangguanjinwen/p/3705487.html
Copyright © 2011-2022 走看看