关于篮球的访谈提纲:我在做网页时,使用JS出了一个问题,大家帮忙看下

来源:百度文库 编辑:高考问答 时间:2024/04/27 23:55:58
我在网页里加了这样一段代码:
<script language="JavaScript">
<!--
todayDate = new Date();
date = todayDate.getDate();
month= todayDate.getMonth() +1;
year= todayDate.getYear();
document.write("今天是")
if(navigator.appName == "Netscape")
{
document.write(1900+year);
document.write("年");
document.write(month);
document.write("月");
document.write(date);
document.write("日");
}
if(navigator.appVersion.indexOf("MSIE") != -1)
{
document.write(year);
document.write("年");
document.write(month);
document.write("月");
document.write(date);
document.write("日");
}
if (todayDate.getDay() == 5) document.write("星期五")
if (todayDate.getDay() == 6) document.write("星期六")
if (todayDate.getDay() == 0) document.write("星期日")
if (todayDate.getDay() == 1) document.write("星期一")
if (todayDate.getDay() == 2) document.write("星期二")
if (todayDate.getDay() == 3) document.write("星期三")
if (todayDate.getDay() == 4) document.write("星期四")
//-->
</script>
这段代码是在表格中的,为什么我想显示的内容比我期望的要靠下呢?

如果不出意料的话是你的这段JS之外的那个表格的问题!
请仔细查看!