1
<%@ page language="vb" %>
2
<h1>使用Choose函數(shù)簡化Select
Case
語句</h1>
3
<%
4
Dim intA as integer=2, strTemps as string
5
strTemps=Choose(intA,"一","二","三","四","五")
6
response.write("intA的值是" & intA & "時(shí),結(jié)果為"&strTemps)
7
%> Choose函數(shù)語法: Choose(數(shù)值變量,返回值1,返回值2,返回值3,......)
注意intA一定要是數(shù)值變量!
response.write()里面如果是字符串或html語句,要加上"",是變量則加上&, 句中strTemps在右側(cè)則只需加一個(gè)&
posted on 2006-02-08 16:20
The Game, tomtom 閱讀(818)
評論(0) 編輯 收藏