Layerobject corresponding to each layer in your document. It puts these objects in an array in the
document.layersproperty. You access a
Layerobject by indexing this array. To define a layer, use standard HTML syntax. If you specify the
IDattribute, you can use the value of that attribute to index into the
layersarray. For a complete description of layers, see Dynamic HTML in Netscape Communicator. Some
layerproperties can be directly modified by assignment; for example, "
mylayer.visibility = hide". A layer object also has methods that can affect these properties.
onMouseUpevents at the level of the layer and process them as you want.
layerobject above this one in z-order, among all layers in the document or the enclosing window object if this layer is topmost.
srcattribute is a URL that indicates the image to use to provide a tiled backdrop. The value is null if the layer has no backdrop. For example:
layer.background.src = "fishbg.gif";
layerobject below this one in z-order, among all layers in the document or null if this layer is at the bottom.
BGCOLORattribute of the
BODYtag. You can set the
bgColorproperty at any time. If you express the color as a hexadecimal RGB triplet, you must use the format
rrggbb. For example, the hexadecimal RGB values for salmon are
blue=72, so the RGB triplet for salmon is
myLayerlayer's canvas to aqua using a string literal:
myLayer.bgColor="aqua"The following example sets the background color of the
myLayerlayer's canvas to aqua using a hexadecimal triplet:
captureEventsin a signed script and precede it with
enableExternalCapture. For more information and an example, see
captureEventsworks in tandem with
layerobject contains its own
documentobject. This object can be used to access the images, applets, embeds, links, anchors and layers that are contained within the layer. Methods of the
documentobject can also be invoked to change the contents of the layer.
handleEventworks in tandem with
Layer.xproperty is a convenience synonym for the
pageYproperties of the
IDattribute in the
layerobject that contains this layer, or the enclosing
windowobject if this layer is not nested in another layer.
releaseEventsworks in tandem with
routeEventworks in tandem with
layerobject below this one in z-order, among all layers that share the same parent layer or null if layer is at the bottom.
Layer.yproperty is a convenience synonym for the
showmeans show the layer;
hidemeans hide the layer;
inheritmeans inherit the visibility of the parent layer.
Frameobject that contains the layer, regardless of whether the layer is nested within another layer.
xproperty is a convenience synonym for the
yproperty is a convenience synonym for the
zIndexmust be 0 or a positive integer.
Last Updated: 05/28/99 11:59:42