欢迎您 本站地址:  
返回首页   返回编程教学   在线工具  端游源码  中国各省电话区号  数字与字母  电视剧搜索  三国志  学习CSS  学习Echarts 

ASP Exists 方法


Dictionary 对象参考手册 完整的 Dictionary 对象参考手册

Exists 方法返回一个布尔值,该布尔值指示在 Dictionary 对象中是否存在指定的 key。如果存在,返回 true,否则返回 false。

语法

DictionaryObject.Exists(key)

参数 描述
key 必需的。要搜索的 key 值。

实例

<%
dim d
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "n","Norway"
d.Add "i","Italy"
d.Add "s","Sweden"

if d.Exists("n")=true then
??Response.Write("Key exists!")
else
??Response.Write("Key does not exist!")
end if

set d=nothing
%>

输出:

Key exists!


Dictionary 对象参考手册 完整的 Dictionary 对象参考手册
小库提示

扫描下方二维码,访问手机版。