Layer.document
JavaScript 1.2+ Nav4+ Syntax
layer.document
Description
The document property of the Layer object references the Document object contained in the layer.
Example
Listing 7.330 shows how the document property is used. When the button is clicked, the getInfo() function is called. This displays the name of the document in layer1.
Listing 7.330 Example of the document Property
<html> <head> <title> Using the document property of the Layer object</title> </head> <body> <script language="JavaScript"> <!-- Hide // function displays an alert box indicating the name of Layer 1 document function getInfo(){ alert("The name of Layer 1's document is: " + document.layer1.document.name); } // End Hide ---> </script> <layer id="layer1" ... |
Get Pure JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.