ASP Item 屬性
完整的 Dictionary 對象參考手冊
Item 屬性設(shè)置或返回 Dictionary 對象中某個項(xiàng)目的值。
語法
DictionaryObject.Item(key)[=newitem]
參數(shù) | 描述 |
key | 必需的。與 item 相關(guān)聯(lián)的 key。 |
newitem | 可選的。規(guī)定與 key 相關(guān)聯(lián)的值。 |
實(shí)例
<%
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"))
%>
輸出:
The value of key pi is: Pink
完整的 Dictionary 對象參考手冊
更多建議: