Each item in this array corresponds to a <LAYER> tag in the document. This array also includes layers that are created in Netscape by setting the position attribute of an HTML <DIV> tag to absolute.
The layers in this array are ordered according to the order in which they appear in the document. Layers can be accessed associatively if they have been given an ID with the ID="..." or NAME="..." tag attribute. This means you can refer to an element whose ID is set to ABC by its unique name, either as document.ABC or document.layers["ABC"].
There is a bug in the layer management code in Netscape. If a <LAYER> tag is placed into the document without an ID="..." or NAME="..." HTML tag attribute, it will increment the length count for the LayerArray but an object will not be placed into the array.
Now if you try to enumerate through all the layers in the array using the length value, your enumeration loop will cause errors when it tries to access elements beyond the physical length of the array.
To avoid this, you should always add NAME="..." HTML tag attributes to the <LAYER> tags to ensure the layers are stored in the array. ID="..." HTML tags are important and helpful when trying to access objects in MSIE and in Netscape 6.0.
No longer supported in Netscape 6.0.
|length||1.2||4.0||, ReadOnly, Deprecated|