Ftp web hosting - 236Part IIIDocument Objects ReferenceFor decrementing through an array

236Part IIIDocument Objects ReferenceFor decrementing through an array (in other words, starting from the last item in the arrayand working toward the first), the initial expression must initialize the counting variable asthe length minus one: for (var i = someArray.length - 1; i >= 0; i–) {…} For most arrays and collections, the lengthproperty is read-only and governed solely by thenumber of items in the group. But in more recent versions of the browsers, you can assignvalues to some object arrays (areas, options, and the selectobject) to create placeholdersfor data assignments. See discussions of the area, select, and optionelement objects fordetails. A plain JavaScript array can also have its lengthproperty value modified by script toeither trim items from the end of the array or reserve space for additional assignments. SeeChapter 30 for more about the Arrayobject. ExampleYou can try the following sequence of statements in the top text box of The Evaluator to seehow the lengthproperty returns values (and sets them for some objects). Note that somestatements work in only some browser versions. (All browsers) document.forms.length(All browsers) document.forms[0].elements.length(NN3+, IE4+) document.images.length(NN4+) document.layers.length(IE4+) document.all.length(IE5+, W3C) document.getElementById( myTable ).childNodes.lengthRelated Items:area, select, option, and Arrayobjects. localNamenamespaceURIprefixValue:String.Read-Only Compatibility:WinIE-, MacIE-, NN6+, Moz1+, Safari1+ The three properties, localName, namespaceURI, and prefix, apply to any node in an XMLdocument that associates a namespace URI with an XML tag. Although NN6 exposes all threeproperties for all element (and node) objects, the properties do not return the desired values. However, Mozilla-based browsers remedy the situation. To better understand what valuesthese three properties represent, consider the following XML content: To Kill a Mockingbird The element whose tag is is associated with the Namespace URI defined for theblock, and the element s namespaceURIproperty would return the string http:// bigbooks. org/schema. The tag name consists of a prefix (before the colon) and the local name (afterthe colon). In the above example, the prefixproperty for the element defined by thetag would be bk, while the localNameproperty would return title. ThelocalNameproperty of any node returns the same value as its nodeNameproperty value, such as #textfor a text node. For more information about XML Namespaces, visit http://www.w3.org/TR/REC-xml-names. Related Items:scopeName, tagUrnproperties. elementObjectCollection.length