For Next循环使用时你要执行一段代码多次集数语法如下
For counter = initial_value to finite_value [Step increment]
statements
Next
For语句指定计数器变量及其初步和有限的价值 Next语句增加了对抗一个变量可
选的步骤关键字允许增加或减少的值指定计数器变量
有一个很简单的例子
<%@ language="vbscript" %>
<%
For i = to Step use i as a counter
responsewrite("The number is " & i & "<br />")
Next
%>
复杂实例
Select ActionSelect AllTry It<%@ language="vbscript" %>
<%
responsewrite("<h>Multiplication table</h>")
responsewrite("<table border= width=%")
For i = to this is the outer loop
responsewrite("<tr>")
responsewrite("<td>" & i & "</td>")
For j = to inner loop
responsewrite("<td>" & i * j & "</td>")
Next repeat the code and move on to the next value of j
responsewrite("</tr>")
Next repeat the code and move on to the next value of i
responsewrite("</table>")
%>