指定的键存在吗?

代码:

<!DOCTYPE html>

<html>

<body>

 

<%

dim d

set d=Server.CreateObject("Scripting.Dictionary")

d.Add "n", "Norway"

d.Add "i", "Italy"

if d.Exists("n")= true then

    Response.Write("Key exists.")

else

    Response.Write("Key does not exist.")

end if

set d=nothing

%>

 

</body>

</html>

结果:

Key exists.

相关文章