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