SELECT...CASE语句在ASP中的用法

    技术2022-05-11  69

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><html><head><title>SELECT...CASE</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><%  dim a,b  a=40  select case a  case 10   response.Write("a=10")  case 20   response.Write("a=20")  case 30   response.Write("a=30")  case 40   response.Write("a=40")     end select  response.Write("<br>-------------CASE后面的值可以是数字型,也可以是字符型---------------<br>")    b="aa"  select case b  case "10"   response.Write("b=10")  case "20"   response.Write("b=20")  case "30"   response.Write("b=30")  case "aa"   response.Write("b=aa")     end select 

    %></html> 


    最新回复(0)