当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP Key 属性
The Key property sets a new key value for an existing key value in a Dictionary object.
ASP Key(关键词)属性为字典对象中的一个现存关键词设置一个新的值。
DictionaryObject.Key(key)=newkey |
Parameter参数 | Description描述 |
---|---|
key | Required. The name of the key that will be changed 必要参数。指出需要对值作改变的关键词的名称 |
newkey | Required. The new name of the key 必要参数。给关键词重新命名 |
<% Dim d Set d=Server.CreateObject("Scripting.Dictionary") d.Add "re","Red" d.Add "gr","Green" d.Add "bl","Blue" d.Add "pi","Pink" d.Key("re")="r" Response.Write("The value of key r is: " & d.Item("r")) %> Output: The value of key r is: Red |