# Window moveBy() Method
[ Window Object](#)
* * *
## Definition and Usage
The moveBy() method moves a window relative to its current position by a specified number of pixels.
## Syntax
window.moveBy(x,y)
* * *
## Browser Support

The moveBy() method is supported by all major browsers.
* * *
## Example
## Example
Move the window 250 pixels relative to its current position:
function openWin(){
myWindow=window.open('','','width=200,height=100');
myWindow.document.write("
This is my window
");
}
function moveWin(){
myWindow.moveBy(250,250);
myWindow.focus();
}
[Try it yourself Β»](#)
* * Window Object](#)