出来るのだASP Q&A掲示板(過去LOG)
訪問数 52046
昨日 889
今日 776 【PR】 パソコン入門からIT専門書まで幅広く取り揃えています。セブン-イレブン受取り手数料無料のセブンアンドワイ。 |
![]() ![]() ![]() ![]() ![]() |
[5567] Re:初心者でめちゃくちゃですがよろしくお願いします |
投稿者:Lightningさん 2006/01/11 8:39:13 |
ソース上の改善点はいろいろありますが、質問への回答は if request("year")="" then iyear = year(now) else iyear =request("year") end if こういうことだと思いますが・・・ なお、メソッドがpost固定で決まっているのならrequestはrequest.formを使ったほうがいいです。 request.formはformのmethodがpostの場合に使います。 request.form("year")とかって感じに。 で、改善点ですが・・・ 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 は select case Yhyo case 0: response.write "略" case 6: response.write "略" case else: response.write "略" end select って感じにしてしまうとか、いろいろ考えられると思います。 #もしかしたらJSなどのswitchの書式と混ざっている可能性があるのでselectCaseに関しては使用前に確認してください。 |
![]() ![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
TreeBBS For ASP V.0.1.3 |