用html写动态图片_用HTML写动态时钟

更新时间:2021-08-14    来源:php基础    手机版     字体:

【www.bbyears.com--php基础】

HTML现在对一个程序人原来说是非常重要的,几乎可以算是各种程序的基础了,所以学号HTML是从事互联网工作必备的。今天文章就给大家介绍通过使用HTML怎么去制作动态时钟,这也是一个非常不错的制作效果。感兴趣的下面一起来看看。

用html写一个动态网页时钟,代码如下所示:

  
  
      
          
        时钟特效  
      
    <script type="text/javascript">  
        function disptime(){  
            var today=new Date();  
            var hh=today.getHours();  
            var mm=today.getMinutes();  
            var ss = today.getSeconds();  
            document.getElementById("myclock").innerHTML="

现在是—"+hh+":"+mm+":"+ss+"

" } //setInterval()方法可以按照指定的周期调用函数或计算表达式 var mytime = setInterval("disptime()",1000); </script>

word-spacing:0px;text-transform:none;font-weight:normal;color:#000000;font-style:normal;orphans:2;widows:2;letter-spacing:normal;text-indent:0px;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;" src="http://img.111cn.net/attachment/art/145680/854737885c.png" />

本文来源:http://www.bbyears.com/jiaocheng/135873.html

猜你感兴趣