Latest web development tutorials

คุณสมบัติของรายการ ASP

อ้างอิงวัตถุพจนานุกรม อ้างอิงวัตถุสมบูรณ์พจนานุกรม

การตั้งค่าคุณสมบัติสินค้าหรือผลตอบแทนที่คุ้มค่าของรายการในวัตถุพจนานุกรม

ไวยากรณ์

DictionaryObject.Item(key)[=newitem]

参数 描述
key 必需的。与 item 相关联的 key。
newitem 可选的。规定与 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"))
%>

输出:

The value of key pi is: Pink


อ้างอิงวัตถุพจนานุกรม อ้างอิงวัตถุสมบูรณ์พจนานุกรม