ASP Key 属性

ການອະທິບາຍ ແລະ ການນໍາໃຊ້

Key 属性在 Dictionary 对象中为已有的 key 设置新值。

ວິທີການ:

DictionaryObject.Key(key)=newkey
Parameter ການອະທິບາຍ
key ຕ້ອງການ。ຊື່ key ທີ່ຕ້ອງແກ້ໄຂ。
newkey ຕ້ອງການ。ຊື່ໃໝ່ຂອງ key。

ຄວາມຄິດຈະຍືນ

<%
Dim d
Set d=Server.CreateObject("Scripting.Dictionary")
d.Add "re","ສີສີນ"
d.Add "gr","ສີຂຽວ"
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