返回一個數組,其中包含了一個 Dictionary 對象中的所有條目。
object.Items( )
其中 object 總是一個 Dictionary 對象的名稱。
下面這段代碼說明了 Items 方法的用法:
function ItemsDemo(){var a, d, i, s; //創建一些變量。d = new ActiveXObject("Scrd.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 對象
新聞熱點
疑難解答