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

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 Item 属性


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

The Item property sets or returns the value of an item in a Dictionary object.
ASP Item属性的作用是设置或返回一个字典对象的元素(item)值

Syntax
语法

DictionaryObject.Item(key)[=newitem]

Parameter参数 Description描述
key Required. The key associated with the item
必要参数。指定与元素相联系的关键词
newitem Optional. Specifies the value associated with 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"
Response.Write("The value of key pi is: " & d.Item("pi"))
%>

Output:

The value of key pi is: Pink

评论 (0) All

登陆 | 还没注册?