Layer.left

JavaScript 1.2+ Nav4+ Syntax

							layer.left

Description

The left property of the Layer object represents the x-coordinate position of the layer within the document. Changing this property can move the layer left or right.

Example

Listing 7.332 shows how the left property is used to move the layer from left to right across the screen. When the button is clicked, the move() function is called, which moves the layer1 to the left by 60 pixels.

Listing 7.332 Example of the left Property
<html>
<head>
<title> Using the left property of the Layer object</title>
</head>
<body>

<script language="JavaScript">
<!-- Hide

// function moves Layer 1 to the left
function move(){
     document.layer1.left = document.layer1.left + 10;
}
							 // End Hide ...

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.