Layer.clip.width

JavaScript 1.2+ Nav4+ Syntax

							layer.clip.width

Description

The clip.width property of the Layer object represents the width of the layer's clipping area.

Example

Listing 7.329 shows how the clip.width property is used to shorten the width of the layer. Two layers are created using the <layer> tag. When the button is clicked, the clip1() function is called, which clips the width of layer1 by 60 pixels.

Listing 7.329 Example of the clip.width Property
<html>
<head>
<title> Using the clip.width property of the Layer object</title>
</head>
<body>

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

// function changes the width of Layer 1
function clip1(){
     document.layer1.clip.width = 60;
}
// End Hide --->
</script>
							 <layer id="layer1" ...

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.