Layer in an HTML document.
Platform Support
| IE | Mozilla | Netscape | Opera | Safari | no | no | 4.0+ | no | no |
|---|
Constructors
| Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | ||
|---|---|---|---|---|---|---|---|---|
|
Layer Constructor() : Layer
Creates a new instance of a Layer object.
|
Show Details | no | no | 4.0+ | no | no | ||
Layer() : LayerCreates a new instance of a Layer object. Returns
|
||||||||
Properties
| Property | Action | IE | Mozilla | Netscape | Opera | Safari |
|---|---|---|---|---|---|---|
|
Layer object directly above the current layer in the z-index order.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Image displayed in the background of the layer.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Layer object directly below the current layer in the z-index order.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Background color of the layer.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
clip.bottom
: Object
Bottom edge of the clipping area of the layer, relative to layer.top.
|
Show Details | no | no | 4.0+ | no | no |
|
||||||
|
clip.height
: Object
Height of the clipping area of the layer.
|
Show Details | no | no | 4.0+ | no | no |
|
||||||
|
clip.left
: Object
Left edge of the clipping area of the layer, relative to layer.left.
|
Show Details | no | no | 4.0+ | no | no |
|
||||||
|
Right edge of the clipping area of the layer, relative to layer.right.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
clip.top
: Object
Top edge of the clipping area of the layer, relative to layer.top.
|
Show Details | no | no | 4.0+ | no | no |
|
||||||
|
Width of the clipping area of the layer.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Document associated with the layer.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Specifies whether a layer is hidden (true) or visible (false).
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Array of child layers of the current layer.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Horizontal position (in pixels) of the left edge of the layer.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Name of the layer.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Horizontal position (in pixels) of the layer relative to the page.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Vertical position (in pixels) of the layer relative to the page.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Parent layer of the current layer.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Layer object directly above the current layer in the z-index order that shares the same parent as the current layer.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Layer object directly below the current layer in the z-index order that shares the same parent as the current layer.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
URL for the contents of the layer.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Vertical position (in pixels) of the top edge of the layer.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Specifies whether the layer should be visible ("show"), hidden ("hide"), or inherit the visibility of the parent layer ("inherit").
|
No Details | |||||
|
|
||||||
|
Window or frame object that contains the layer.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Horizontal position (in pixels) of the left edge of the layer.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Vertical position (in pixels) of the top edge of the layer.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
|
Position of the layer in the z-order, relative to its sibling layers.
|
No Details | no | no | 4.0+ | no | no |
|
|
||||||
Functions
| Method | Action | IE | Mozilla | Netscape | Opera | Safari | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
captureEvents() : Object
Sets the layer to capture all events of a specified type.
|
Show Details | no | no | 4.0+ | no | no | ||||||||
|
Returns
|
||||||||||||||
|
handleEvent() : Object
Calls the event handler for the specified event.
|
Show Details | no | no | 4.0+ | no | no | ||||||||
|
Returns
|
||||||||||||||
|
load(String src, Number width) : Object
Loads contents into the layer and updates the width of the layer.
|
Show Details | no | no | 4.0+ | no | no | ||||||||
|
Parameters
Returns
|
||||||||||||||
|
moveAbove(Object target) : Object
Moves the current layer above another layer.
|
Show Details | no | no | 4.0+ | no | no | ||||||||
|
Parameters
Returns
|
||||||||||||||
|
moveBelow(Object target) : Object
Moves the current layer below another layer.
|
Show Details | no | no | 4.0+ | no | no | ||||||||
|
Parameters
Returns
|
||||||||||||||
|
moveBy(Number dx, Number dy) : Object
Moves the layer the specified amount down and to the right.
|
Show Details | no | no | 4.0+ | no | no | ||||||||
|
Parameters
Returns
|
||||||||||||||
|
moveTo(Object x, Object y) : Object
Moves the layer to a specified position relative to the document or parent layer.
|
Show Details | no | no | 4.0+ | no | no | ||||||||
|
Parameters
Returns
|
||||||||||||||
|
moveToAbsolute(Object x, Object y) : Object
Moves the layer to a specified position on the page.
|
Show Details | no | no | 4.0+ | no | no | ||||||||
|
Parameters
Returns
|
||||||||||||||
|
offset(Number dx, Number dy) : Object
Moves a layer down and to the right by a specified amount. Deprecated by moveBy().
|
Show Details | no | no | 4.0+ | no | no | ||||||||
|
Parameters
Returns
|
||||||||||||||
|
releaseEvents() : Object
Sets the layer to release all captured events of a specified type.
|
Show Details | no | no | 4.0+ | no | no | ||||||||
|
Returns
|
||||||||||||||
|
resizeBy(Number dw, Number dh) : Object
Resize the layer by the specified amount.
|
Show Details | no | no | 4.0+ | no | no | ||||||||
|
Parameters
Returns
|
||||||||||||||
|
resizeTo(Object width, Object height) : Object
Resize the layer to a specified size.
|
Show Details | no | no | 4.0+ | no | no | ||||||||
|
Parameters
Returns
|
||||||||||||||
|
routeEvent() : Object
Routes a captured event through the event hierarchy.
|
Show Details | no | no | 4.0+ | no | no | ||||||||
|
Returns
|
||||||||||||||
References
Availability
Netscape 4 only|discontinued in Netscape 6
