1
<%@ page language="vb" %>
2
<h1>使用Iif()函数简化If
Then语句</h1>
3
<%
4
Dim intA As integer=11, strTemps As String
5
strTemps=Iif(intA>10,"intA变量的值大于10","变量的值小于10")
6
response.write(strTemps)
7
%> Iif函数语法: Iif(条件式,语句1,语句2)
语句1:当条件式运算结果为True值的表达式或变量内容
语句2:当条件式运算结果为False值的表达式或变量内容
respose.write()里面可以直接写变量的名
posted on 2006-02-08 15:55
The Game, tomtom 阅读(438)
评论(0) 编辑 收藏