Layer.resizeTo()

JavaScript 1.2+ Nav4+ Syntax

							layer.resizeTo(x,y)

Description

The resizeTo() method of the Layer object resizes the layer object to the specified value. The x parameter refers to the number of pixels the layer width is increased. The y parameter refers to the number of pixels the layer height is increased.

Example

Listing 7.350 shows how to resize a layer. When the button is clicked, the onClick event handler uses the resizeTo() method to resize layer2.

Listing 7.350 Example of the resizeTo() Method
 <html> <head> <title> Using the resizeTo method of the Layer object</title> </head> <body> <layer id="layer1" width=200 height=200 color= bgcolor="yellow" TOP=170 LEFT=200 VISIBILITY="show"> <center>Layer 1</center> ...

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.