ASP ItemsMethod


Dictionary 对象参考手册Complete Dictionary Object Reference

The Items method returns an array containing all items in a Dictionary object.

Syntax

DictionaryObject.Items

Example

<%
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>Item values:</p>")
a=d.Items
for i=0 to d.Count-1
  Response.Write(a(i))
  Response.Write("<br>")
next

set d=nothing
%>

Output:

Item values:

Norway
Italy
Sweden


Dictionary 对象参考手册Complete Dictionary Object Reference Other Extensions