VOOZH about

URL: https://www.geeksforgeeks.org/html/html-dom-window-moveto-method/

⇱ HTML DOM Window moveTo() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML DOM Window moveTo() Method

Last Updated : 15 Jun, 2023

The moveTo() method is used in the window to moves the window from the left and top coordinates.

Syntax: 

window.moveTo(x, y)

Parameter:  

  • x: A positive or negative number that specifies the horizontal coordinate to be moved to
  • y: A positive or negative number specifies the vertical coordinate to be moved to

Example: Move the window.  

Output: 

Initial: 

👁 Image

New window: 

👁 Image

Move window:  

👁 Image

Supported Browsers: The browser supported by Window moveTo() Method are listed below:  

  • Google Chrome 1
  • Mozilla Firefox 1
  • Internet Explorer 4
  • Opera 12.1
  • Safari 1
  • Edge 12
Comment
Article Tags: