<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>日历</title>
</head>
<body>
<%
function countDays(iMonth,iYear)
select case iMonth
case 1,3,5,7,8,10,12
countDays=31
case 2
if isdate("2/29/"&iYear) then
countDays=29
else
countDays=28
end if
end select
end function
function firstDay(iMonth,iYear)
FirstDay=weekDay(iMonth&"/1/"&iYear)
end function
dim mMonth,mYear
mMonth=Month(date())
mYear=Year(date())
mDay=Day(date())
response.Write"<center>"&mYear&"年"&mMonth&"月"&"</center><hr>"
%>
<table border="1" cellpadding="5" cellspacing="0" width="80%">
<tr>
<td>星期日</td>
<td>星期一</td>
<td>星期二</td>
<td>星期三</td>
<td>星期四</td>
<td>星期五</td>
<td>星期六</td>
</tr>
<tr>
<%
j=1
for i=1 to 42
response.Write"<td align=right>"
if i>=FirstDay(mMonth,iYear) and j<=countDays(mMonth,mYear) then
if mDate=j then
response.Write"<font color=blue>"&j&"</font>"
else
response.Write j
end if
j=j+1
else
response.Write " "
end if
response.Write"</td>"
if i mod 7=0 then
response.Write"</tR><tr>"
end if
next
%>
</tr>
</table>
</body>
</html>
这是日历编码,我是照书抄的,但还是出错了 下面是原码