特效时钟

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>特效时钟</title>
    </head>
    <body>
        <div id="myblock"></div>
        <script type="text/javascript">
            
            
            function mytime(){
            var time=new Date();
            var hh=time.getHours();
            var mm=time.getMinutes();
            var ss=time.getSeconds();
            document.getElementById("myblock").innerHTML="现在是"+hh+":"+mm+":"+ss;
        
        }
            var my=setInterval("mytime()",1000)
        </script>
        <input type="button" value="取消" onclick="javascript:clearInterval(my)">
    </body>
</html>

特效时钟

 

上一篇:C# ToString()时间大小写区别


下一篇:Spring boot中用logback实现日志管理