スポンサーリンク


変数宣言の強制

<% Option Explicit %>

定数

Const PI = 3.14
Response.Write(( 10 * 10 ) * PI ) 

配列

Dim week(6)     '0~6の7要素を持つ配列が作成されます。
week(0) = "sun"
week(1) = "mon"
Response.Write(week(0))    'sunと出力

文字列結合演算子

a & b

IF文

If 条件1 Then
   条件1が真の処理
ElseIf 条件2 Then
   条件2が真の処理
Else
   その他
End If 

SELECT文

Select Case 値
   Case 条件
       処理ブロック
   Case 条件
       処理ブロック
   Case Else
       処理ブロック
End Select

DO文

Do Until 条件
   処理ブロック
Loop
Do
   Response.Write("Hello World")
Loop Until 11 > 10 

WHILE文

Do While 条件
   処理ブロック
Loop
while 条件
   処理ブロック
Wend 

FOR文

For a = 1 To 10 Step 1
  Response.Write(a)
Next

EXIT

Do While 1
    Exit Do
Loop

配列に対して全ての処理

Dim intArr(10)
Dim intTmp
For intTmp = To 10
   intArr(intTmp)=intTmp
Next
For Each intTmp in intArr
   Response.Write(intTmp)
Next 

GETメソッド

Request.QueryString("sample")

POSTメソッド

Request.Form("txtSample")

参考


Total:4122 / Today:1 / Yesterday:0


スポンサーリンク


トップ   差分 バックアップ リロード   一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2010-07-22 (木) 17:14:07