zoukankan      html  css  js  c++  java
  • 网页时钟 当前时间 备留

    <body bgcolor="#fef4d9" ONLOAD=show5()>
    ////////////////////////////////////////////////////
    ////////////////////////////////////////////////
    ///////////////////////////////////////////////
    <script language="JavaScript">
    <!-- Hide
      var timerID = null
      var timerRunning = false
      function stopclock (){
      if(timerRunning)
      clearTimeout(timerID);
      timerRunning = false
      }
      function showtime () {
      var now = new Date();
      var year = now.getYear();
      var month = now.getMonth() + 1;
      var date = now.getDate();
      var hours = now.getHours();
      var minutes = now.getMinutes();
      var seconds = now.getSeconds();
      var day = now.getDay();
      Day = ["星期天","星期一","星期二","星期三","星期四",""星期五","星期六"];

      var timeValue = "";
      timeValue += (year<1000?year+1900:year) + "年";
      timeValue += (month < 10 ? "0" : "") + month + "月";
      timeValue += (date<10?"0":"") + date + "日  ";
      timeValue += (Day[day]) + "  ";
      timeValue += (hours < 10?"0":"")+hours;
      timeValue += (minutes < 10? ":0" : ":") + minutes;
      timeValue += (seconds < 10? ":0" : ":") + seconds;
      //timeValue += (hours < 12) ? "上午" : "下午";
      document.jsfrm.face.value = timeValue;
      timerID = setTimeout("showtime()",1000);
      timerRunning = true
      }
      function startclock () {
      stopclock();
      showtime()
      }
      //-->

    </script>
     <form name='jsfrm'>
                        <input type=text name='face' size=34 value=''>
                      </form>

    <body bgcolor="#fef4d9" onLoad="startclock()">

  • 相关阅读:
    Qt简介以及如何配置Qt使用VS2010进行开发
    QT里重定向另外一个控制台程序的输出
    windows下制作PHP扩展
    20款Notepad++插件下载和介绍
    音频编码协议介绍
    用 PHP 读取文件的正确方法
    QT进程间通信
    关于YUV色彩空间
    解析xml 四种
    System.getProperty
  • 原文地址:https://www.cnblogs.com/Denny_Yang/p/2530487.html
Copyright © 2011-2022 走看看