December 2001
Intermediate to advanced
480 pages
9h 22m
English
As in JavaScript, VBScript has more than one loop structure. The for/next loop is like the for loop in JavaScript, and the do/while loop is equivalent to the do/while loop in JavaScript. The do/until loop is like the do loop in JavaScript.
The for/next structure in VBScript expects a beginning and ending value for the loop. With each iteration of the loop, any statements between the for and next statements are executed. The following example shows a simple application using a loop to place formatted values on the screen. Note how the variable spacer is created using a loop as well.
<%
Dim counter, newline,spacer,x newline="<br>" for x=1 to 10 spacer="-" & space next For counter = 1 to 25 Response.write (counter ...Read now
Unlock full access