Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Window moveTo() method

Window moveTo() method

Window Object Reference Window Object


Definition and Usage

The moveTo() method moves the top-left corner of the window to a specified coordinate.

Syntax

window.moveTo(x,y)


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the moveTo() method

Note: Specify moveTo(0,0) to position the window at the top-left corner of the browser in Opera.


Example

Example

Move the new window to the top-left corner of the screen:

Runoob Tutorial(runoob.com)



Try it »


Window Object Reference Window Object