<Html>
<Head>
<Title> </title>
<Script language = "javascript">
Function get_time ()
{
Var date = new Date ();
Var year = "", month = "", day = "", week = "", hour = "", minute = "", second = "";
Year = date. getYear ();
Month = add_zero (date. getMonth () + 1 );
Day = add_zero (date. getDate ());
Week = date. getDay ();
Switch (date. getDay ()){
Case 0: val = "Sunday"; break
Case 1: val = "Monday"; break
Case 2: val = "Tuesday"; break
Case 3: val = "Wednesday"; break
Case 4: val = "Thursday"; break
Case 5: val = "Friday"; break
Case 6: val = "Saturday"; break
}
Hour = add_zero (date. getHours ());
Minute = add_zero (date. getMinutes ());
Second = add_zero (date. getSeconds ());
Timetable. innerText = "" + year + "." + month + "." + day + "+ hour +": "+ minute +": "+ second + val;
}
Function add_zero (temp)
{
If (temp <10) return "0" + temp;
Else return temp;
}
SetInterval ("get_time ()", 1000 );
</Script>
</Head>
<Body>
<Div id = "timetable"> </div>
</Body>
</Html>
From Tian Yi LoveZLL