window.resizeBy()

JavaScript1.2+, JScript3.0+ Nav4+, IE4+ Syntax

							window.resizeBy(numHort, numVert)

Description

The resizeBy() method of the Window object resizes the specified window by the number of pixels passed to the method. As shown in the syntax definition, the first numeric value passed to the method represents the number of vertical pixels you want to size the window by, while the second numeric value represents the horizontal number of pixels.

If the numbers passed are positive, the window size is increased. Negative numbers reduce the size of the window.

Example

Listing 7.575 has four buttons. Two buttons are for increasing height, and the other two are for increasing width. If you click these buttons, the window will resize ...

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.