tmpdate=new Date();date=tmpdate.getDate();month=tmpdate.getMonth()+1;year=tmpdate.getYear();document.write(year);document.write("年");document.write(month);document.write("月");document.write(date);document.write("日&nbsp;&nbsp;");myarray=new array(6);myarray[0]="星期日 "
myarray[1]="星期一 "
myarray[2]="星期二 "
myarray[3]="星期三 "
myarray[4]="星期四 "
myarray[5]="星期五 "
myarray[6]="星期六 "
weekday=tmpdate.getDay();if(weekday==0|weekday==6)
{document.write(myarray[weekday])
}else
{document.write(myarray[weekday])
};
var tags_before_clock = ""
var tags_after_clock = ""
if(navigator.appname == "netscape") {
document.write('<layer id="clock"></layer>');
}if (navigator.appversion.indexof("msie") != -1){
document.write('');
}function showclock()
{var date = new Date();
var hour = date.getHours();
var min = date.getMinutes();
var sec = date.getSeconds();
var col = ":";
var spc = " ";
var apm;
if ( hour>24 )
{apm="p.m.";
hour=hour-24;
}else
{apm="a.m.";
}if (hour == 0) hour=24;
if (min<=9) min="0"+min;
if (sec<=9) sec="0"+sec;
if(navigator.appname == "netscape")
{document.clock.document.write(tags_before_clock
+hour+col+min+col+sec+spc+tags_after_clock);
document.clock.document.close();
}if (navigator.appversion.indexof("msie") != -1)
{clock.innerhtml = tags_before_clock+hour
+col+min+col+sec;
}}
setinterval("showclock()",1000);
