ASP Keys メソッド

定義と用法

Keys メソッドは、Dictionary オブジェクト内のすべてのキーを含む配列を返します。

文法:

DictionaryObject.Keys

インスタンス

<%
dim d,a,i
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "c","China"
d.Add "i","Italy"
d.Add "s","Sweden"
Response.Write("<p>キー値:</p>")
a=d.Keys
for i=0 to d.Count-1
  Response.Write(a(i))
  Response.Write("<br />")
次へ
set d=nothing
%>

出力:

キーワードの値:
c
i
s