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

Window moveBy() method

Window moveBy() method

Window Object Reference Window Object


Definition and Usage

The moveBy() method moves the window by the specified number of pixels relative to its current coordinates.

Syntax

window.moveBy(x,y)


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the moveBy() method


Example

Example

Move the window 250 pixels relative to its current position:

Runoob Tutorial(runoob.com)



Try it »


Window Object Reference Window Object