Latest web development tutorials

Window resizeBy () method

Window Object Reference Window object

Definition and Usage

resizeBy () method for the specified pixel to resize the window.

NOTE: This method definition specifies the bottom right corner of the window to move pixels left corner will not be moved (it stays in its original coordinates).

grammar

resizeBy(width,height)

parameter description
width Required. To increase the number of pixels in the window width. It can be positive, negative values.
height Optional. To make the window height increased number of pixels. It can be positive, negative values.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support resizeBy () method, except for Opera and Chrome.


Examples

Examples

Re-set window size in various ways to 100px:

<html>
<head>
<script>
function resizeWindow()
{
window.resizeBy(100,100)
}
</script>
</head>
<body>

<input type="button" onclick="resizeWindow()" value="Resize window">

</body>
</html>

try it"


Window Object Reference Window object