1142 Part IV (Bulletproof web design) . JavaScript Core Language Reference
1142 Part IV . JavaScript Core Language Reference Table 42-2 (continued) Method Description Add( key , value) Adds a value associated with a unique key name Exists( key ) Returns Boolean true if key exists in dictionary Items() Returns VBArray of values in dictionary Keys() Returns VBArray of keys in dictionary Remove( key ) Removes key and its value RemoveAll() Removes all entries For more details, visit http://msdn.microsoft.com/scripting/jscript/ doc/jsobjDictionary.htm. Enumerator An Enumeratorobject provides JavaScript with access to collections that other wise do not allow direct access to their items via index number or name. This object isn t necessary when working with DOM collections, such as document.all, because you can use the item() method to obtain a reference to any member of the collection. But if you are scripting ActiveX objects, some of these objects meth ods or properties may return collections that cannot be accessed through this mechanism or the JavaScript for-inproperty inspection technique. Instead, you must wrap the collection inside an Enumerator object. To wrap a collection in an Enumerator, invoke the constructor for the object, passing the collection as the parameter: var myEnum = new Enumerator(someCollection) This enumerator instance must be accessed via one of its four methods to posi tion a pointer to a particular item and then extract a copy of that item. In other words, you don t access a member directly (that is, by diving into the collection with an item number to retrieve). Instead, you move the pointer to the desired posi tion and then read the item value. As you can see from the list of methods in Table 42-3, this object is truly intended for looping through the collection. Pointer control is limited to positioning it at the start of the collection and incrementing its position along the collection by one: myEnum.moveFirst() for (; !myEnum.atEnd(); myEnum.moveNext()) { val = myEnum.item() // more statements that work on value } Enumerator
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.