纯asp打造的日历程序,可自行美化,这里仅提供最简单的css样式。。。
<style>
ボディ{font-size:12px 0 0 20px;
TR、TD {Text-Align:Center;}
</style>
<%
'==========================
'説明:カレンダーファイル
'==========================
'対応する年と月のブログログデータを取り出す
'======================
ryear = cint(request.querystring( "year")
rmonth = cint(request.querystring( "month")
ryear = 0r ryear = nullの場合、ryear = year(now)
rmonth = 0またはrmonth = nullの場合、rmonth =月(今)
nowtime = ryear& " - "&rmonth& "-1" ''今月の初日を取得する
nowyear = year(nowtime) '
nowmonth = month(nowtime) '月
Nowweekday = feekday(nowtime)-1 '
'2月の日数を取得します
2月= 28
if nowyear / 4 = 0 Theon Febdays = 29
'今月の日数を取得してください
If Nowmonth = 1では
月の日= 31
elseifif nowmonth = 2次に
月の日= 2月
elseifif nowmonth = 3次に
月の日= 31
elseifif nowmonth = 4次に
月の日= 30
elseifif nowmonth = 5次に
月の日= 31
elseifif nowmonth = 6次に
月の日= 30
elseifif nowmonth = 7次に
月の日= 31
elseifif nowmonth = 8次に
月の日= 31
elseifif nowmonth = 9次に
月の日= 30
elseifif nowmonth = 10次に
月の日= 31
elseifif nowmonth = 11次に
月の日= 30
それ以外
月の日= 31
ifを終了します
calendar = "<a href = 'calendar.asp?year ="&nowyear -1& "&month ="&nowmonth& "'>&lt; </a>&nbsp;"
willshowmonthmonth = nowmonth
willshowmonththth -1 <= 0の場合、thatn willshowmonthmonth = 2
カレンダー= "<a href = 'calendar.asp?year ="&nowyear& "&month ="&willshowmonthmonth -1&lt;
WillshowMonthmthth + 1> 12の場合、Thatn WillshowMonththth = 11
カレンダー& "<a href = 'calendar.asp?year ="&nowyear& "&month ="&willshowmonth + 1&gt;
カレンダー&「href = 'calendar.asp?year = "&nowyear ="&nowmonth& "'>&nbsp;
カレンダー=カレンダー& "<table bgcolor =#000000 cellspacing = 1 width = 200> <tr bgcolor =#ffffff> <td colspan = 7>" now)& "</td> </tr>"&vbcrf
カレンダー=カレンダー& "<tr bgcolor =#ffffff>"&vbcrlf
カレンダー=カレンダー& "<td> day </td>"&vbcrlf
カレンダー=カレンダー& "<td> one </td>"&vbcrip
カレンダー=カレンダー& "<td> 2 </td>"&vbcrlf
カレンダー=カレンダー& "<td> 3 </td>"&vbcrlf
カレンダー=カレンダー&「<td> 4 </td>」&vbcrlf
カレンダー=カレンダー& "<td> 5 </td>"&vbcrlf
カレンダー=カレンダー& "<td> 6 </td>"&vbcrlf
カレンダー=カレンダー& "</tr>"&vbcrlf
カレンダー=カレンダー&vbcrlf& "<tr bgcolor =#ffffff>"&vbcrlf
'前に空白を追加します
nowmonthfirstiweekday = weekday(nowyear& " - "&nowmonth& "-1")-2 '今月の初日
i = 0からnowmonthfirstiweekdayの場合
カレンダー=カレンダー& "<td bgcolor =#efefef>&nbsp; </td>"&vbcrlf
次
'日付を開始します
t = 1
i = 1から月の日
If years(now)= year(nowyear& " - "&newmonth& " - "&i)and day(now)= day(nowear& " - "&nowmonth& " - "&i)then '今日のハイライトショー
カレンダー=カレンダー& "<td bgcolor =#cccccc> <a href = '' '>"&i& "</a> </td>"
それ以外
カレンダー=カレンダー& "<td>&i&" </td> "&vbcrlf
ifを終了します
平日の場合(nowyear& " - "&nowmonth& " - "&i)= 7 then
t = t+1
カレンダー=カレンダー& "</tr> <tr bgcolor =#ffffff>"&vbcrlf
ifを終了します
次
i = 1から(7*t-(nowmonthfirstiweekday+1+monthdays)の場合)
カレンダー=カレンダー& "<tdbgcolor =#ffffff> </td>"&vbcrlf
次
カレンダー=カレンダー&vbcrlf& "</tr>"
カレンダー=カレンダー& "</table>"&vbcrip
Response.Writeカレンダー
%>