HTML DOM Window moveBy() Method (original) (raw)

Last Updated : 2 Aug, 2023

The **Window moveBy() method is used for moving a window with a specified number of pixels relative to its current coordinates. The Window moveBy() method accepts two parameters x and y which denote the number of pixels to move the window horizontally and vertically.

**Syntax:

window.moveBy(x, y)

**Parameters Used:

The below program illustrates the Window moveBy() Method:

**Example: Moving a new window relative to its current position

HTML `

Window moveBy() Method in HTML