企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
| JScript  | [语言参考](#) | |-----|-----| # Items 方法 返回一个数组,其中包含了一个 **Dictionary** 对象中的所有条目。 `*object*.Items( ) ` 其中 *object* 总是一个 **Dictionary** 对象的名称。 #### 说明 下面这段代码说明了 **Items** 方法的用法: ~~~ function ItemsDemo() { ~~~     ~~~ var a, d, i, s;                  // ~~~ 创建一些变量。     ~~~ d = new ActiveXObject("Scripting.Dictionary"); ~~~ ~~~    d.Add ("a", "Athens");              // ~~~ 添加一些主键和条目。     ~~~ d.Add ("b", "Belgrade"); ~~~ ~~~    d.Add ("c", "Cairo"); ~~~ ~~~    a = (new VBArray(d.Items())).toArray();   // ~~~ 获取条目。     ~~~ s = ""; ~~~ ~~~    for (i in a)                  // ~~~ 遍历该 ~~~ dictionary ~~~ 。    {        ~~~ s += a[i] + "<br>"; ~~~ ~~~    } ~~~ ~~~    return(s);                     // ~~~ 返回结果。 } #### 请参阅 [Add 方法 (Dictionary)](#) | [Exists 方法](#) | [Keys 方法](#) | [Remove 方法](#) | [RemoveAll 方法](#)应用于: [Dictionary 对象](#) [© 2000 Microsoft Corporation 版权所有。保留所有权利。使用规定。](#)