假如 Dictionary 對象中存在所指定的主鍵則返回 true,否則返回 false。
object.Exists(key)
object
必選項。總是一個 Dictionary 對象的名稱。
key
必選項。需要在 Dictionary 對象中搜索的 key 值。
下面這個例子說明了 Exists 方法的用法。
function keyExists(k){var fso, s = "";d = new ActiveXObject("Scrd.Add("b", "Belgrade");d.Add("c", "Cairo");if (d.Exists(k))s += "Specified key exists.";elses += "Specified key doesn't exist.";return(s);}
Add 方法 (Dictionary) Items 方法 Keys 方法 Remove 方法 RemoveAll 方法應用于: Dictionary 對象
新聞熱點
疑難解答