zoukankan      html  css  js  c++  java
  • 一个时间

    <!DOCTYPE html>
    <html>

    <head>
    <meta charset="UTF-8">
    <title></title>
    </head>

    <body>
    <input type="button" value="开始计时" onclick="timeout"> 分钟
    <form name="a">
    <input type="text" value="0" name="minture"></form>

    <form name="b">
    <input type="text" value="0" name="second"></form>
    <input type="button" value="停止计时" onclick="stoptime">

    </body>

    </html>
    <script>
    var x = -1;
    y = -1;

    function countMin() {
    y=y+1;
    var n=y%60;
    document.a.minture.value = n;
    setTimeout("countMin()", 1000 * 60)
    }

    function countsec() {
    x = x + 1;
    var z = x % 60
    document.b.second.value = z;
    setTimeout("countsec()", 1000)
    }

    countMin()
    countsec()
    </script>

  • 相关阅读:
    SQL之层次查询
    GROUP函数
    SQL之统计
    正则表达式
    聚合函数,分析函数
    oracle函数
    Vue3.0优化
    浅谈FC
    短链接生成原理
    Vue路由传参
  • 原文地址:https://www.cnblogs.com/xieyunhuaxiang/p/6755078.html
Copyright © 2011-2022 走看看