出来るのだASP Q&A掲示板(過去LOG)
訪問数 52046
昨日 889
今日 776 【PR】 パソコン入門からIT専門書まで幅広く取り揃えています。セブン-イレブン受取り手数料無料のセブンアンドワイ。 |
![]() ![]() ![]() ![]() ![]() |
[5565] 初心者でめちゃくちゃですがよろしくお願いします |
投稿者:さとしさん 2006/01/10 17:40:44 |
<%@ language=vbscript %> <% option explicit %> <html> <head> <title>カレンダー表示</title> </head> <body bgcolor="#f5f5f5"> <% dim saisyuubi dim hiduke dim Thyo dim Yhyo dim iyear dim imonth iyear = year(now) imonth= month(now) hiduke = 1-weekday(dateserial(iyear,imonth,1))+1 saisyuubi = day(dateserial(iyear,imonth+1,1-1)) response.write "西暦" & iyear & "年" & imonth & "月" &_ "<table border=0>" for Yhyo = 0 to 6 response.write "<td width=50 height=25 align=center>" if (weekday(Yhyo) = 7) then response.write "<font color=red>" end if if (weekday(Yhyo) = 6) then response.write "<font color=blue>" end if response.write weekdayname(Yhyo+1,true) response.write "</td>" next for Thyo = 0 to 5 response.write "<tr>" for Yhyo = 0 to 6 if hiduke > 0 and hiduke <= saisyuubi then response.write "<td width=50 height=50 align=center>" if Yhyo = 0 then response.write "<font color=red>" & hiduke & "</font>" end if if Yhyo = 6 then response.write "<font color=blue>" & hiduke & "</font>" end if if Yhyo = 1 then response.write "<font color=black>" & hiduke & "</font>" end if if Yhyo = 2 then response.write "<font color=black>" & hiduke & "</font>" end if if Yhyo = 3 then response.write "<font color=black>" & hiduke & "</font>" end if if Yhyo = 4 then response.write "<font color=black>" & hiduke & "</font>" end if if Yhyo = 5 then response.write "<font color=black>" & hiduke & "</font>" end if response.write "</td>" else response.write "<td width=50 height=50 align=center>" & "" response.write "</td>" end if hiduke = hiduke + 1 if hiduke > saisyuubi then exit for end if next response.write "</tr>" if hiduke > saisyuubi then exit for end if next response.write "</table>" response.write "今日は" & CDate(now()) %> <form method = "post" action = "test/calender.asp"> <input type = "text" name = "year" size = "8" value = "<% response.write year(now) %>">年 <input type = "text" name = "month" size = "4" value = "<% response.write month(now) %>">月 <input type = "submit" value = "カレンダ表示" > </body> </html> |
![]() ![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
TreeBBS For ASP V.0.1.3 |