由于ASP不能使用GOTO语句,我在FOR循环中加入一个FOR循环,若需要跳出,即退出最里面那个FOR循环。
DEMO:
ASP跳出FOR循环
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/213301.html原文链接:https://javaforall.net
ASP跳出FOR循环由于 ASP 不能使用 GOTO 语句 我在 FOR 循环中加入一个 FOR 循环 若需要跳出 即退出最里面那个 FOR 循环 DEMO dimaa 0fori 1to10 nbsp nbsp nbsp forj 1to1 nbsp nbsp nbsp nbsp nbsp nbsp a a 1 nbsp nbsp nbsp nbsp nbsp nbsp nbsp ifi 5then nbsp nbsp nbsp a 5 不会输出 nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp exitfor nbsp nbsp nbsp nbsp nbsp nbsp nbsp endIf nbsp nbsp nbsp nbsp nbsp nbsp Resp
由于ASP不能使用GOTO语句,我在FOR循环中加入一个FOR循环,若需要跳出,即退出最里面那个FOR循环。
DEMO:
ASP跳出FOR循环
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/213301.html原文链接:https://javaforall.net