resizeTo method (window)
Resizes the browser window to the specified size.
The resizeTo method leaves the top-left corner of the browser window in place, it moves the other corners if necessary.
- If you want to resize the browser window by a specified amount of pixels, use the resizeBy method.
- The browser window can be moved with the moveBy and moveTo methods.
- To get the size and the top-left corner of the browser window, use the outerWidth, outerHeight and the screenX, screenY properties.
- If you need information about the dimensions of the screen, use the screen object.
You can find the related objects in the Supported by objects section below.
|Required. Integer that specifies the new width of the browser window.|
|Required. Integer that specifies the new height of the browser window.|
This method has no return value.
Example HTML code 1:
This example illustrates the use of the resizeBy and resizeTo methods:
Did you find this example helpful?
User Contributed Comments