返回一个所有项目的数组

代码:

<!DOCTYPE html>

<html>

<body>

 

<%

dim d,a,i,s

set d=Server.CreateObject("Scripting.Dictionary")

d.Add "n", "Norway"

d.Add "i", "Italy"

 

Response.Write("<p>The values of the items are:</p>")

a=d.Items

for i = 0 To d.Count -1

    s = s & a(i) & "<br>"

next

Response.Write(s)

 

set d=nothing

%>

 

</body>

</html>

结果:

The values of the items are:

Norway
Italy

相关文章