ASP条件语句

来源:互联网 发布:天猫淘宝助理 编辑:程序博客网 时间:2024/06/14 10:10

条件语句:

If.......Then .......Else......End

 

Select Case 语句的应用

 

Selset Case任意数字,或字符串

           Case “Strname”

                     Response.Write("输出数据或调用函数")

           Case “Strname”

                     Response.Write("输出数据或调用函数")

           Case “Strname”

                     Response.Write("输出数据或调用函数")

           Case “Strname”

                     Response.Write("输出数据或调用函数")

           Case “Strname”

                     Response.Write("输出数据或调用函数")

           Case Else

 End Select

 

Do......Loop语句的应用

Do  While Not Rs.Eof

       Response.Write("输出数据数")

      rs.movenext

loop

 

 

While........Wend语句的应用

While  条件

       Response.Write("输出数据数")

      Rs.MoveNext

Wend

 

For ....... Next

 

For Each......Bext

 

For  Each Vr in Object

 

Next

 

 

Exit Do  强迫离开Do循环

Exit For 强迫离开For循环

Exit Function 强迫离开Function循环

Exit Sub 强迫离开Sub过程

原创粉丝点击