1<%@ page language="vb" %>
2<h1>使用Choose函数简化SelectCase语句</h1>
3<%
4Dim intA as integer=2, strTemps as string
5strTemps=Choose(intA,"一","二","三","四","五")
6response.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) 编辑 收藏