/* 此程式為 時間程式 */
document.write("<span id='clock'></span>");
var nowDate,theDate,theDay,theYear,theMonth,theHour,theMin,theSec,timeValue;
function ShowDateTime()
{
 weeks = new Array("Sunday","Monday", "Tuesday","Wednesday","Thursday","Friday","Saturday");
 nowDate = new Date();

 theDate = nowDate.getDate();
 theDay = weeks[nowDate.getDay()];
 theYear = nowDate.getYear();
 theMonth = nowDate.getMonth() + 1;
 theHour = nowDate.getHours();
 theMin = nowDate.getMinutes(); if (theMin < 10) theMin = "0"+theMin;  // 小於 10 分補 0
 theSec = nowDate.getSeconds(); if (theSec < 10) theSec = "0"+theSec;  // 小於 10 秒補 0
 timeValue=theDay+" , " +theDate+"-"+theMonth+"-"+theYear+"  "+", "+theHour+":"+theMin+":"+theSec;
 clock.innerHTML = timeValue;
 setTimeout("ShowDateTime()",1000);
}
ShowDateTime();
