📄 year.asp
字号:
<%
mMonth=month(now)
yYear=year(now)
dDay = DateSerial(yYear,mMonth,1)
mMonth = Month(dDay)
yYear = Year(dDay)
FirstDayOfMonth = Weekday(dDay)
Response.Write "<TABLE Align=center width='100%' CELLPADDING=2 CellSpacing=1 BORDER=0>"
Response.Write "<TR VALIGN=MIDDLE ALIGN=CENTER>"
Response.Write "<TD height=15 BgColor='" & atabletitlecolor & "' ALIGN=center><b>"
Response.Write year(now)&"年"&month(now)&"月"&day(now)&"日"
Response.Write "</b></TD>"
Response.Write "</TR>"
Response.Write "</TABLE>"
'## Start Displaying the Actual Calendar ##
Response.Write "<Table width='100%' Align=center CellPadding=2 CellSpacing=1 Border=0 bgcolor="&tablebackcolor&">"
Response.Write "<TR Align=Center BgColor='" & atabletitlecolor & "'>"
For i = vbSunday To vbSaturday
Response.Write "<TD BgColor='" & atablebodycolor & "'>" & right(WeekDayName(i),1) & "</TD>"
Next
Response.Write "</TR>"
'## Set dDay to the First day of the month ##
dDay = DateSerial(yYear,mMonth,1)
FOR j=1 to 6
Response.Write "<TR>"
FOR i=vbSunday to vbSaturday
CellStr=" "
Color=atablebodycolor
If WeekDay(dDay) = i and Month(dDay) = mMonth then
'## Set Color to Yellow if Current Day
if (Day(dDay) = Day(now)) and (Month(dDay) = Month(now)) and (Year(dDay) = Year(now)) then
Color=tabletitlecolor
else
Color=atablebodycolor
end if
CellStr = Day(dDay)
'## Get the Next Day
dDay = DateAdd("d",1,dDay)
End If
Response.Write "<TD vAlign=top align=left BgColor='" & color & "'>" & CellStr & "</TD>"
NEXT '## FOR i=vbSunday to vbSaturday ##
Response.Write "</TR>"
NEXT '## For j=1 to 6 ##
Response.Write "</Table>" & vbCrlf
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -