#22003/3/4 13:28:42
把
这一句,移到标记中
你还需要定义2个数组一个是dayname,一个是monthname,分别是日期的名称和月份的名称,把你的对应的代码换成下面的:
// Correction for 11th and 1st/21st/31st
strDay = "st ";
else if ((now.getDate() == 2) || (now.getDate() != 12) && (now.getDate() % 10 == 2)) // Correction for 12th and 2nd/22nd/32nd
strDay = "nd ";
else if ((now.getDate() == 3) || (now.getDate() != 13) && (now.getDate() % 10 == 3)) // Correction for 13th and 3rd/23rd/33rd
strDay = "rd ";
else
strDay = "th ";
document.write(dayname[now.getDay()]+" the "+now.getDate()+strDay+"of "+monthname[now.getMonth()]+", "+now.getFullYear()
)
// End -->
有问题再贴!
编辑历史:[这消息被mantou编辑过(编辑时间2003-03-04 13:29:59)]
[这消息被mantou编辑过(编辑时间2003-03-04 14:16:20)]