HTML DOM Window moveTo() Method Last Updated : 15 Jun, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 toy: A positive or negative number specifies the vertical coordinate to be moved to Example: Move the window. html <!DOCTYPE html> <html> <head> <title> Window moveTo() Method </title> <style> h1 { color: green; } </style> </head> <body> <center> <h1>Geeks for Geeks</h1> <button onclick="openWin()"> Create </button> <button onclick="moveWin()"> Move </button> <script> var myWindow; function openWin() { myWindow = window.open("", "myWindow", "width=200", "height=100"); myWindow.document.write( " <p>This is 'myWindow'</p> "); } function moveWin() { myWindow.moveTo(500, 100); myWindow.focus(); } </script> </center> </body> </html> Output: Initial: New window: Move window: Supported Browsers: The browser supported by Window moveTo() Method are listed below: Google Chrome 1Mozilla Firefox 1Internet Explorer 4Opera 12.1Safari 1Edge 12 Comment More infoAdvertise with us Next Article HTML DOM open() Method V Vijay Sirra Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML DOM Window moveBy() Method 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)Paramet 2 min read HTML DOM Window resizeTo() Method The HTML Window resizeTo() Method is used to resize a window to the specified width and height. Syntax: window.resizeTo(width, height) Parameters: width: Sets the width of the window, in pixels.height: Sets the height of the window, in pixels. Example: In this example, we will resize the window by u 1 min read HTML DOM Window Scroll() Method The Window scroll() method scrolls the window to a particular place in the document. This method is different form scrollTo() method as it takes different parameters like scrolling behavior, etc using ScrolltoOptions Dictionary. Syntax: window.scroll(x-coord, y-coord) Or window.scroll(options) Param 2 min read HTML DOM open() Method The DOM Open() method in HTML is the combination of the following three steps: Opens an output stream to collect the output.Collects output from the document.write() or document.writeln() methods.Runs the document.close to display the output written to the output stream. Syntax: document.open( MIMEt 2 min read HTML DOM Window name Property The Window name property is used for setting or returning the name of a window. It is generally used to modify the name of a window which has been created in the past. It returns a string which represents the name of the window.Syntax: window.name Return Value: It returns a string value that represe 2 min read HTML DOM Window top( ) Property The Window top() property is used to return the topmost browser window of a current window. It is a read-only property and it returns a reference to the topmost window in the window hierarchy.Syntax: window.top Return Value: It returns the reference of the topmost window in the window hierarchy. Bel 2 min read Like