Previous Chapter's Examples-|-Next Example-|-Return to Chapter Listing

Example 14.1:
A Simple Layers Example

This heading is in a layer.

This text is in the layer, too.
[This example works with Netscape Navigator 4. It won't work with Netscape Navigator 2 or 3, or Internet Explorer 3.]

This is a simple layer's example. You can see the orange layer on top of the main page, and move it by clicking the Down button. (Reload to move it back up.)


We created a layer like this: <LAYER NAME="titleLayer" WIDTH=400 LEFT=250 TOP=10 BGCOLOR="orange"> <H1> This heading is in a layer. </H1> This text is in the layer, too. </LAYER> We have this button: <form> <INPUT TYPE="button" VALUE=" Down " onclick="layers.titleLayer.top = 200"> </form>
Previous Chapter's Examples-|-Next Example-|-Return to Chapter Listing