<body>
do while….loop<br />
<%
‘do while….loop 类似.net中的while(){}
i=6
Do while i < 10
response.Write(i&”<br>”)
i=i+1
Loop
%>
do ….loop until<br />
<%
‘do while….loop 类似.net中的while(){}
i=6
Do
response.Write(i&”<br>”)
i=i+1
Loop until i < 10
%>
while….wend <br />
<%
i=10
while i<20
response.Write(i&”<br>”)
i=i+1
wend
%>
For…Next<br />
<%
for i=0 to 10 ‘ 包括0到10
response.Write(i&”<br>”)
if i=5 then
exit for
end if
next
%>
<body>
do while….loop<br />
<%
‘do while….loop 类似.net中的while(){}
i=6
Do while i < 10
response.Write(i&”<br>”)
i=i+1
Loop
%>
do ….loop until<br />
<%
‘do while….loop 类似.net中的while(){}
i=6
Do
response.Write(i&”<br>”)
i=i+1
Loop until i < 10
%>
while….wend <br />
<%
i=10
while i<20
response.Write(i&”<br>”)
i=i+1
wend
%>
For…Next<br />
<%
for i=0 to 10 ‘ 包括0到10
response.Write(i&”<br>”)
if i=5 then
exit for
end if
next
%>
For…..each….next<br />
<%
dim array(3)
array(1)=”A”
array(2)=”B”
array(3)=”C”
for each a in array
response.Write(a&”<br>”)
next
%>
</body>
</html>
© 版权声明
文章版权归作者所有,未经允许请勿转载。