Javascript Reference
Categories: document

javascript document layers[ ]

@March 15, 2008, 1:22 a.m.
layers[ ] NN |4| IE n/a Chrome/Safari/DOM n/a

Read-only

Returns an array of all Navigator 4-only layer element objects in the current document. Also included in the array are references to other HTML elements with style sheets that set the element to be relative- or absolute-positioned (in which case, Navigator 4 treats those elements as layer objects). Items in this array are indexed (zero-based) in source code order, and may be accessed by number or by string name. As a dead-end feature implemented only in Navigator 4, the presence of this property indicates support for the unique referencing requirements for Netscape layers.

 
Example
 
if (document.layers) {
    // use document.layers[ ] syntax for references
}
 
Value

Array of layer objects or their equivalent.

 
Default

Array of zero length.

great
Guest #916 - 2011-10-17

Powered by Linode.