ASP Items 方法

定义和用法

Items 方法返回包含 Dictionary 对象中的所有项的一个数组。

语法:
  1. DictionaryObject.Items

实例

  1. <%
  2. dim d,a,i
  3. set d=Server.CreateObject("Scripting.Dictionary")
  4. d.Add "c","China"
  5. d.Add "i","Italy"
  6. d.Add "s","Sweden"
  7. Response.Write("<p>项的值为:</p>")
  8. a=d.Items
  9. for i=0 to d.Count-1
  10. Response.Write(a(i))
  11. Response.Write("<br />")
  12. next
  13. set d=nothing
  14. %>

输出:

  1. 项的值为:
  2. China
  3. Italy
  4. Sweden

分类导航