[ASP]select case範圍選擇方式
發表於 : 2008年 11月 26日, 17:56
在 asp 中使用 Select Case 判定範圍方式, 利用 Select Case True, 並配合判斷式來操作即可, 範例如下:
代碼: 選擇全部
id = Request("id")
Select Case True
Case id < 100 ' id < 100
str = "id < 100"
Case fid < 200 ' id >=100 and < 200
str = "id < 200"
Case fid < 300 ' id >=200 and < 300
str = "id < 300"
Case fid < 400 ' id >=300 and < 400
str = "id < 400"
Case Else
str = "id unknown"
End Select
Response.Write str