ASP流程控制语句asp

/ / 2019-06-24   阅读:2492
ASP流程控制语句   1.if...then语句 单行: if 条件 then 语句 多行: if 条件 then elseif 条件 then 语句 elseif 条件 then 语句 else end if   2.select case语句 select case 变量 ca...
ASP流程控制语句
 
1.if...then语句
单行:
if 条件 then 语句
多行:
if 条件 then
elseif 条件 then
语句
elseif 条件 then
语句
else
end if
 
2.select case语句
select case 变量
case 值
语句
case 值
语句
case else
语句
end select
 
ASP循环语句

1.for...next
for 变量=起始值 to 终止值 [step 步长]
语句
next
eg:
for i=1 to 10 
sum=sum+1
next
 
2.do while...loop
do while 条件(成立的条件)
语句
loop
 
3.do until...loop
do until 条件(不成立的条件)
语句
loop
 
4.do...loop while
do
语句
loop while 条件(成立的条件)
 
5.do...loop until
do
语句
loop until 条件(不成立的条件)
 
6.while...wend 等同于do...loop
while 条件(成立的条件)
语句
wend

我要评论

昵称:
验证码:

最新评论

共0条 共0页 10条/页 首页 上一页 下一页 尾页
意见反馈