ASP Key 属性

定义和用法

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

语法:

DictionaryObject.Key(key)=newkey
Parameter Description
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
系统帮助 | 给我留言 | 收藏本站
Copyright © 2005-2008 www.cnn84.com All Rights Reserved Ver:2.0
CNN84网是公益性便民网站,是为了给大家的日常生活查询及提供最快捷的出行指南