Items 方法
返回一个数组,其中包含有 Dictionary 对象中的所有项目 。
object.Items
object 应为 Dictionary 对象的名称 。
说明
以下代码举例说明如何使用 Items 方法:
Function DicDemo Dim a,d,I,s 创建一些变量Set d = CreateObject("Scripting.Dictionary")d.Add "a","Athens" 添加键和项目d.Add "b","Belgrade"d.Add "c","Cairo"a = d.Items 获取项目 。For i = 0 To d.Count -1 循环使用数组 。 s = s & a(i) & "<BR>" 创建返回字符串 。 Next DicDemo = sEnd Function