asp编写简单日历的一点疑惑
<body>
<%
dim a,b,c,d,e
a=year(date)
b=month(date)
response.write(a&"年"&b&"月")
response.write"<br>"
%></p>
<hr align="left" width="560" size="2">
<table width="560" height="60" border="1" >
<tr>
<th>星期一</th>
<th>星期二</th>
<th>星期三</th>
<th>星期四</th>
<th>星期五</th>
<th>星期六</th>
<th>星期日</th>
</tr>
<%
response.write("<tr></tr>")
c=datediff("d",a&"-"&b&"-1",a&"-"&(b+1)&"-1")'当月的天数
d=weekday(a&"-"&b&"-1",vbmonday)'1号是星期?
for i=1 to d-1
response.write("<td> </td>")
next
for ii=1 to c
if i=d then
response.write("<td><font color='#ooooff'><div align='center'>"&ii&"</div></font></td>")
if weekday(a&"-"&b&"-"&ii)=1 then
response.write("<tr></tr>")
end if
end if
next
for iii=1 to 35-(d-1)-c
response.write("<td> </td>")
next%>
</table>
</body>
其中在两个微笑表情之间的代码是读不懂的,请高手代为指点下思路,谢谢了 !