ASP Remove 方法
完整的 Dictionary 對(duì)象參考手冊(cè)
Remove 方法從 Dictionary 對(duì)象中刪除一個(gè)指定的 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 "n","Norway"
d.Add "i","Italy"
d.Add "s","Sweden"
d.Remove("n")
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:
i
s
完整的 Dictionary 對(duì)象參考手冊(cè)
更多建議: