/

HTML / CSS / JavaScript Tutorial

JavaScript Window method: resizeTo()

[this page | pdf | back links]

The resizeTo() method (when applied to Window objects in the JavaScript BOM) resizes a window to a specified size (in the x and y directions) leaving the position of the top left corner unchanged.

 

It has the following syntax with the following parameters. It does not return a value.

 

window.resizeTo(x, y)

 

Parameter

Required / Optional

Description

x

Required

Number specifying width in pixels

y

Required

Number specifying height in pixels

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)


Desktop view | Switch to Mobile