1
<%@ page language="vb" %>
2
<h1>使用Iif()函數(shù)簡化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函數(shù)語法: Iif(條件式,語句1,語句2)
語句1:當條件式運算結果為True值的表達式或變量內容
語句2:當條件式運算結果為False值的表達式或變量內容
respose.write()里面可以直接寫變量的名
posted on 2006-02-08 15:55
The Game, tomtom 閱讀(439)
評論(0) 編輯 收藏