⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1.htm

📁 这个是本人收集的关于网页制作方面的东西 有购物车示例 很实用
💻 HTM
字号:
<html>
<head>
<title></title>
<script>
          function tick() 
          {
           var hours, minutes, seconds, xfile;
           var intHours, intMinutes, intSeconds;
           var today;
           today = new Date();
           intHours = today.getHours();
           intMinutes = today.getMinutes();
           intSeconds = today.getSeconds();
           if (intHours == 0) {
                                           hours = "12:";
                                           xfile = "午夜";
                                         }
          else if (intHours < 12) { 
                   hours = intHours+":";
                   xfile = "上午";
                    }
           else if (intHours == 12) {
                   hours = "12:";
                   xfile = "正午";
                   }
           else {
                    intHours = intHours - 12
                    hours = intHours + ":";
                    xfile = "下午";
                   }
         if (intMinutes < 10)
            {
                     minutes = "0"+intMinutes+":";
            }
         else 
            {
                    minutes = intMinutes+":";
            }
         if (intSeconds < 10)
           {
                     seconds = "0"+intSeconds+" ";
           }
         else 
            {
                    seconds = intSeconds+" ";
            } 
           timeString = xfile+hours+minutes+seconds;
           Clock.innerHTML = timeString;
            window.setTimeout("tick();", 100);
           }
            window.onload = tick;
</script>
</head>
<body>
                <div id="Clock" align="center" style="font-size: 20; color:#000000"></div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -