August 1999
Intermediate to advanced
1488 pages
72h 53m
English
layer.document
The document property of the Layer object references the Document object contained in the layer.
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.
<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" ... |
Read now
Unlock full access