当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP Key 属性

ASP
ASP Drive
ASP File
ASP Folder
ASP Dictionary
ASP ADO
ASP AdRotator
ASP BrowserCap
ASP Content Linking
ASP Content Rotator
ASP Quick Ref
ASP 摘要
ASP 实例

ASP Key 属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 349 ::
收藏到网摘: n/a

The Key property sets a new key value for an existing key value in a Dictionary object.
ASP Key(关键词)属性为字典对象中的一个现存关键词设置一个新的值。

Syntax
语法

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
必要参数。给关键词重新命名

Example
举例

<%
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

评论 (0) All

登陆 | 还没注册?