在网页上“显示同步时间”代码是什么?

来源:百度知道 编辑:UC知道 时间:2024/06/21 22:54:24

<td align="middle" width="200" bgcolor="#e6e0e4"> <script language="JavaScript" type="text/javascript">
todayDate = new Date();
date = todayDate.getDate();
month= todayDate.getMonth() +1;
year= todayDate.getYear();
if(navigator.appName == "Netscape")
{
document.write(1900+year);
document.write("年");
document.write(month);
document.write("月");
document.write(date);
document.write("日");
document.write(" ")
}
if(navigator.appVersion.indexOf("MSIE") != -1)
{
document.write(year);
document.write("年");
document.write(month);
document.write("月");
document.write(date);
document.write("日");
document.write(" ")
}
if (todayDate.getDay() == 5) document.write("星期五")
if (todayDate.getDay() ==