当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP Remove 方法
The Remove method removes one specified key/item pair from the Dictionary object.
ASP Remove的作用是从字典中删除一组指定的关键词/元素组对(key/item pair)
DictionaryObject.Remove(key) |
Parameter参数 | Description描述 |
---|---|
key | Required. The key associated with the key/item pair to remove 必要参数。指出需要删除的关键词/元素组对(key/item pair)中的关键词 |
<% 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 %> Output: Key values: i s |