//版权所有：华夏企业网——www.huaxiasite.com www.huaxiasite.cn
//该程序免费可以转载，但必须保留完整信息
//华夏企业网（www.huaxiasite.com）日期显示完整实例
<!-- Hide
//时钟，当前日期及时间显示
var timerID = null
var timerRunning = false
function MakeArray(size) {
    this.length = size;
    for(var i = 1; i <= size; i++)
      {
        this[i] = "";
      }
  return this;
}
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 = new MakeArray(7);
  Day[0]="月曜日";
  Day[1]="火曜日";
  Day[2]="水曜日";
  Day[3]="木曜日";
  Day[4]="金曜日";
  Day[5]="土曜日";
  Day[6]="日曜日";
  var timeValue = "";
  timeValue += year + "-";
  timeValue += ((month < 10) ? "0" : "") + month + "-";
  timeValue += date + "  ";
  timeValue += ("[ "+Day[day]) + " ]  ";
  timeValue += ((hours <= 12) ? hours : hours - 12);
  timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
  timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
  timeValue += (hours < 12) ? "  午前" : "  午後";
  document.all.clock.innerText = timeValue;
  timerID = setTimeout("showtime()",1000);
  timerRunning = true
}
function startclock () {
  stopclock();
  showtime()
}