<script language="javascript">
var nowDate,theDate,theDay,theYear,theMonth,theHour,theMin,theSec,timeValue;
function ShowDateTime()
{
weeks=new Array("日","一","二","三","四","五","六");
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;
}
theSec=nowDate.getSeconds();
if(theSec<10)
{
theSec="0"+theSec;
}
timeValue=theYear+"年"+theMonth+"月"+theDate+"日"+"星期"+theDay+""+theHour+":"+theMin+":"+theSec;
//在标题处显示浏览者机器的系统日期与时间
window.document.title = timeValue;
//每1秒钟刷新一次系统日期与时间
setTimeout("ShowDateTime()",1000);
}
ShowDateTime();
</script>