moveTo method (window)
Moves the top-left corner of the browser window to the specified position, relative the top-left corner of the screen.
- To move the browser window relative to its current coordinates, use the moveBy method.
- The browser window can be resized with the resizeBy and resizeTo 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 horizontal coordinate relative to the left side of the screen, in pixels. Negative values are also allowed.|
|Required. Integer that specifies the vertical coordinate relative to the top side of the screen, in pixels. Negative values are also allowed.|
This method has no return value.
Example HTML code 1:
This example illustrates the use of the moveTo method:
Did you find this example helpful?
User Contributed Comments