ASP Remove 方法
定義和用法
Remove 方法從 Dictionary 對(duì)象中刪除指定的 key/item 對(duì)。
語(yǔ)法:
DictionaryObject.Remove(key)
| 參數(shù) | 描述 |
|---|---|
| key | 必需的。與需要?jiǎng)h除的 key/item 對(duì)相關(guān)聯(lián)的 key。 |
實(shí)例
<%
dim d,a,i
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "c","China"
d.Add "i","Italy"
d.Add "s","Sweden"
d.Remove("s")
Response.Write("<p>Key values:</p>")
a=d.Keys
for i=0 to d.Count-1
Response.Write(a(i))
Response.Write("<br />")
next
set d=nothing
%>
輸出:
Key values: c i