home *** CD-ROM | disk | FTP | other *** search
- <DIV ID=layerA STYLE="position: absolute; left: 300; top: 50;
- background-color: red;">
- <P><FONT SIZE=+2>Layer A</FONT></P>
-
- <BLOCKQUOTE ID=layerA1 STYLE="position: absolute; left: 20; top: 30;
- background-color: yellow">
- <P><FONT SIZE=+2>Layer A1</FONT></P>
-
- <P ID=layerA1a STYLE="position: relative; left: 20; top: -24;
- background-color: lightGreen">
- <FONT SIZE=+2>Layer A1a</FONT></P>
-
- <LAYER ID=layerA1b LEFT=20 TOP=60 STYLE="background-color: orange;">
- <P><FONT SIZE=+2>Layer A1b</FONT></P>
- </LAYER>
- </BLOCKQUOTE>
- </DIV>
-
- <BLOCKQUOTE>
- <P><FONT SIZE=+1><U>Layer A1</U></FONT></P>
- <P><B>Parent Layer:</B><BR>
-
- <SCRIPT>
- document.writeln(document.layers[0].document.layers['layerA1'].
- cc]parentLayer.name);
- </SCRIPT>
- </P>
-
- <P><B>Child Layers:</B><BR>
-
- <SCRIPT>
- function printChildLayers(rootDocument)
- {
- for (var i=0; i<rootDocument.layers.length; i++)
- {
- document.writeln(rootDocument.layers[i].name);
- document.writeln("<BR>");
- }
- }
-
- printChildLayers(document.layers[0].document.layers['layerA1'].document);
- </SCRIPT>
- </P>
- </BLOCKQUOTE>
-