ASP Dictionary.Remove 方法
ASP Dictionary.Remove 方法用于从 Dictionary 对象中删除指定的键值对。
句法:
DictionaryObject.Remove(key)
参数值:
- 键:这是一个必需的属性。它指定将被删除的键值对。
示例代码:
ASP
<%
dim d,a,i
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "m","mango"
d.Add "z","zebra"
d.Add "c","cat"
d.Remove("c")
Response.Write("
Key values:
")
a=d.Keys
for i=0 to d.Count-1
Response.Write(a(i))
Response.Write("
")
next
set d=nothing
%>
输出:
Key Values
m
z