展开全部
简单的:if 5>4 then response.write "5大于4"
常规的:
if 5>4 then
response.write "5大于4"
else
response.write "5小于4"
end if
多个条件:
if 5>5 then
response.write "5大于5"
elseif 5=5 then
response.write "5等于5"
else
response.write "5小于5"
end if
嵌套的话把 其中的一个 response.write 换成一个
if * then
*
else
end if
即可
-------------
a=5
if a>0 then
if a=5 then
response.write "a等于5"
else
response.write "a不等于5"
end if
else
response.write "a小于0"
end if
常规的:
if 5>4 then
response.write "5大于4"
else
response.write "5小于4"
end if
多个条件:
if 5>5 then
response.write "5大于5"
elseif 5=5 then
response.write "5等于5"
else
response.write "5小于5"
end if
嵌套的话把 其中的一个 response.write 换成一个
if * then
*
else
end if
即可
-------------
a=5
if a>0 then
if a=5 then
response.write "a等于5"
else
response.write "a不等于5"
end if
else
response.write "a小于0"
end if
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<%
thetime=hour(time)
if thetime=>0 and thetime<6 then
str="凌晨好"
elseif thetime>=6 and thetime<12 then
str="上午好"
elseif thetime=>12 and thetime<14 then
str="中午好"
elseif thetime=>14 and thetime<19 then
str="下午好"
elseif thetime=>19 then
str="晚上好"
end if
response.write str
%>
thetime=hour(time)
if thetime=>0 and thetime<6 then
str="凌晨好"
elseif thetime>=6 and thetime<12 then
str="上午好"
elseif thetime=>12 and thetime<14 then
str="中午好"
elseif thetime=>14 and thetime<19 then
str="下午好"
elseif thetime=>19 then
str="晚上好"
end if
response.write str
%>
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
If 变量=值 Then
If 变量=值 Then
执行语句
Else
执行语句
End If
Else
执行语句
End If
If 变量=值 Then
执行语句
Else
执行语句
End If
Else
执行语句
End If
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
If 条件 Then
If 条件 Then
语句
Else
语句
End If
If 条件 Then
语句
Else
语句
End If
Elseif 条件 Then
语句
else
语句
End If
If 条件 Then
语句
Else
语句
End If
If 条件 Then
语句
Else
语句
End If
Elseif 条件 Then
语句
else
语句
End If
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<%
if i>5 then
if i=4 then
输出
end if
输出
elseif i>3 and i<5 then
输出
end if
%>
if i>5 then
if i=4 then
输出
end if
输出
elseif i>3 and i<5 then
输出
end if
%>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
更多回答(4)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询