ASP Dictionary.Keys 方法
ASP Dictionary.Keys 方法用于返回 Dictionary 对象中所有键的数组。
句法:
DictionaryObject.Keys
示例代码:下面的代码演示了 ASP 键方法。
ASP
<%
dim d,a,i
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "m","mango"
d.Add "e","Elephant"
d.Add "n","Nagaland"
Response.Write("
Key values:
")
a=d.Keys
for i=0 to d.Count-1
Response.Write(a(i))
Response.Write("
")
next
set d=nothing
%>
输出:
Key values:
m
e
n