ASP循环语句之do...loop语句

do ... loop 语句两种格式的示例
do whil ... loop :
以下为引用内容:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> VBscript 循环语句之 do ... loop 语句 </title>
</head>
<body>

<%
dim i          '声明一个变量
i=1            '给变量赋值
do while i<10
response.Write "VBscript 循环语句之 do ... loop 语句 <br/>"
i=i+1
loop
%>

</body>
</html>
do ... loop while:
以下为引用内容:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> VBscript 循环语句之 do ... loop 语句 </title>
</head>
<body>

<%
dim i          '声明一个变量
i=1            '给变量赋值
do 
response.Write "VBscript 循环语句之 do ... loop 语句 <br/>"
i=i+1
loop while i<6
%>

</body>
</html> 
本文链接: http://www.oversteper.com/wprogram/asp/830.html

你可能感兴趣的:(asp,语句,休闲,循环语句,do...loop)