当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP Item 属性
The Item property sets or returns the value of an item in a Dictionary object.
ASP Item属性的作用是设置或返回一个字典对象的元素(item)值
| DictionaryObject.Item(key)[=newitem] |
| Parameter参数 | Description描述 |
|---|---|
| key | Required. The key associated with the item 必要参数。指定与元素相联系的关键词 |
| newitem | Optional. Specifies the value associated with 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"
Response.Write("The value of key pi is: " & d.Item("pi"))
%> Output: The value of key pi is: Pink |
评论 (0) All