Keys Method
object.Keys( )
Parameter Description
• Object, a Mandatory Parameter. This represents the name of the Dictionary Object.
Example
<!DOCTYPE html>
<html>
<body>
<script language="vbscript" type="text/vbscript">
Dim obj_datadict ' Create a variable.
Set obj_datadict = CreateObject("Scripting.Dictionary")
obj_datadict.Add "a", "Apple" ' Add some keys and items.
obj_datadict.Add "b", "Bluetooth"
obj_datadict.Add "c", "C++"
a=obj_datadict.Keys
msgbox a(0)
msgbox a(2)
</script>
</body>
</html>
Save the file as .HTML, and upon executing the above script in IE,
it displays the following message in a message box.
a
c
No comments:
Post a Comment