TUTORIAL后端与 Web 服务FETCHED

ASP Key 属性

ASP Key 属性 完整的 Dictionary 对象参考手册 Key 属性在 Dictionary 对象中为已有的 key 设置新值。 语法 DictionaryObject.Key(key)=newkey 参数 描述 key 必需的。需修改的 key 的名称。 newkey 必需的。key 的新名称。 实例 <% Dim d Set d=Se..

更新于 2026/7/16

教程详情页默认 noindex。

ASP Key 属性


Dictionary 对象参考手册 完整的 Dictionary 对象参考手册

Key 属性在 Dictionary 对象中为已有的 key 设置新值。

语法

DictionaryObject.Key(key)=newkey

参数 描述
key 必需的。需修改的 key 的名称。
newkey 必需的。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"))
%>

输出:

The value of key r is: Red


Dictionary 对象参考手册 完整的 Dictionary 对象参考手册