ASP Keys 方法
❮ 完整 Dictionary 物件參考
Keys 方法返回 Dictionary 物件中所有鍵的陣列。
語法
DictionaryObject.Keys
示例
<%
dim d,a,i
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "n","Norway"
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>")
next
set d=nothing
%>
輸出
鍵值
n
i
s
❮ 完整 Dictionary 物件參考