HTML JavaScript 命运石之门时间线动态时钟(附代码)

导读:本篇文章讲解 HTML JavaScript 命运石之门时间线动态时钟(附代码),希望对大家有帮助,欢迎收藏,转发!站点地址:www.bmabk.com

喂,站在那里的人,赐予你labmem 014的称号!Steins;Gate!

宇宙虽有其起源,却没有终结——无限。星球虽也有起源,却因其自身之力走向毁灭——有限。拥有睿智之才是最为愚蠢者,历史上不胜枚举…这也可以说是给那些抵抗者们的,神的最后通牒

HTML JavaScript 命运石之门时间线动态时钟(附代码)

<html>
<head>
    <meta charset="UTF-8">
    <title>Divergence Meter Time</title>
    <link rel="shortcut icon" href="../Count_Visitor/images/cruise.ico">	
    <style>
        body {
            margin: 0;
        }
        #div19 {
            font-size: 40px;
            position: absolute;
            left: 200px;
            top: 200px;
            width: 1200px;
            height: 200px;
        }

    </style>
    <script src = "./js.js">
        //Implement a digital clock

    </script>

</head>

<body style="background:#000000">
<div id="div18">     
    <div id="div19" style="background:#00000">
        <a  href="http://www.longsong.xyz/Count_Visitor">
        <img src="../Count_Vistor/images/0.png"/>
        <img src="../Count_Vistor/images/0.png"/>
        <img src="../Count_Vistor/images/point.png"/>
        <img src="../Count_Vistor/images/0.png"/>
        <img src="../Count_Vistor/images/0.png"/>
        <img src="../Count_Vistor/images/point.png"/>
        <img src="../Count_Vistor/images/0.png"/>
        <img src="../Count_Vistor/images/0.png"/>
        </a>
        
    </div>
</div>
</body>


</html>

js.js

    function fun(string) {
            if (string <= 9) {
                return "0" + string;
            } else {
                return "" + string;
            }
        }

        window.onload = function () {
            var aadiv = document.getElementById('div19');
            var test = aadiv.getElementsByTagName('img');

            function times() {
                for (var i = 0; i < test.length; i++) {
                    if (i%2 == 0)
                        test[i].src = '../Count_Visitor/images/11.gif';
                    else
                        test[i].src = '../Count_Visitor/images/12.gif';
                }
            }

            function time() {

                var date = new Date();
                var str = fun(date.getHours()) + "p" + fun(date.getMinutes()) + "p" + fun(date.getSeconds());
                for (var i = 0; i < test.length; i++) {

                    test[i].src = '../Count_Visitor/images/' + str[i] + '.png';
                }


            }

            times();
            var timerid = setTimeout(function () { //loading video
                setInterval(time, 1000);
                time();
            }, 3000)

        }

GitHub – longsongline/Steins-Gate-Divergence-Meter-Clock-VisitorCounter: This is a html inspired bySteins;Gate Divergence Meter Clock/VisitorCounter( THE Name is not decide))HTML JavaScript 命运石之门时间线动态时钟(附代码)https://github.com/longsongline/Steins-Gate-Divergence-Meter-Clock-VisitorCounter

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/73537.html

(0)
小半的头像小半

相关推荐

极客之音——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!