asp的if语句且要怎么弄??
2个回答
展开全部
1. if..end if
<%
Dim myNum:myNum = 8
If myNum = 8 Then
Response.Write("你输入正确!")
End If
%>
2.if...else...end if
<%
Dim 销谨myNum:myNum = 10
If myNum = 10 Then
Response.Write("你输入正确!")
Else
Response.Write("你输入错误!")
End If
%>
3.if...elseif...else...end if
<%
Dim myNum:myNum = 10
If myNum > 10 Then
Response.Write("大于庆斗空10")
ElseIf myNum = 10 Then
Response.Write("等于10")
Else
Response.Write("小于10")
End If
%>
4.嵌套使用
<%
Dim myNum:myNum = 10
if myNum>=0 then
if myNum=0 then
誉瞎执行语句1
else
执行语句2
end if
else
执行语句3
end if
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询