August 1999
Intermediate to advanced
1488 pages
72h 53m
English
layer.top
The top property of the Layer object represents the y-coordinate position of the layer relative to the top-level document. Increasing or decreasing this value can move the layer object up or down.
Listing 7.355 uses the top property to move the layer up. When the button is clicked, the move() function is executed, which will move the layer up by 10 pixels.
<html>
<head>
<title> Using the top property of the Layer object</title>
</head>
<body>
<script language="JavaScript">
<!-- Hide
function move(){
document.layer1.top = document.layer1.top - 10;
}
// End Hide --->
</script>
<layer id="layer1" width=200 height=200 color= ... |
Read now
Unlock full access