?
This document uses PHP Chinese website manual Release
JScript? | 語言參考 |
存儲(chǔ)數(shù)據(jù)鍵和項(xiàng)目對(duì)的對(duì)象。
y = new ActiveXObject("Scripting.Dictionary")
Dictionary 對(duì)象等價(jià)于 PERL 聯(lián)合數(shù)組。項(xiàng)目可以是數(shù)據(jù)的任何形式,并存儲(chǔ)在數(shù)組中。每個(gè)項(xiàng)目都與一個(gè)具有唯一性的鍵相聯(lián)。該鍵用于取得單個(gè)項(xiàng)目,并且通常是整數(shù)或字符串,但也可以是除數(shù)組以外的任何類型。
下面代碼演示了如何創(chuàng)建 Dictionary 對(duì)象:
var y = new ActiveXObject("Scripting.Dictionary"); y.add ("a", "test"); if (y.Exists("a"))
???document.write("true");
...
Add 方法 (Dictionary) | Exists 方法 | Items 方法 | Keys 方法 | Remove 方法 | RemoveAll 方法
Count 屬性 | Item 屬性 | Key 屬性
FileSystemObject 對(duì)象 | TextStream 對(duì)象