zoukankan      html  css  js  c++  java
  • 60秒定时减少

    <!DOCTYPE html>
    <html>

        <head>
            <meta charset="UTF-8">
            <title></title>
            <style type="text/css">
                div {
                     200px;
                    height: 200px;
                    border: 1px solid black;
                    margin: 50px auto;
                    text-align: center;
                    line-height: 200px;
                    font-size: 50px;
                }
            </style>
        </head>

        <body>
            <div id="id"></div>
        </body>
        <script type="text/javascript">
            var id = document.all.id;

            var a = 61;

            var n = setInterval(function() {
                a--;
                id.innerHTML = a + "s";
                if(a == 0) {

                    clearInterval(n)
                    id.innerHTML=('时间到了')

                }
            }, 1000);
        </script>

    </html>

  • 相关阅读:
    poj1988
    sgu488
    Walking around Berhattan
    基于矩阵分解的简单推荐算法
    Funny Feature
    php面向对象
    PHPstorm快捷键
    创建UIImage的两种方法
    dismissViewControllerAnimated有延迟
    17个常用代码整理
  • 原文地址:https://www.cnblogs.com/popodashijian/p/5988185.html
Copyright © 2011-2022 走看看