Javascript Window scrollTo() Method Last Updated : 26 Dec, 2022 Comments Improve Suggest changes Like Article Like Report The Window scrollTo() method is used to scroll to a particular set of coordinates in the document. Syntax: window.scrollTo(x-coord, y-coord) Parameters: The scrollTo() method accepts two parameters as described below: x-coord: It is the pixel along the horizontal axis of the document that is displayed in the upper left. It is the required field.y-coord: It is the pixel along the vertical axis of the document that is displayed in the upper left. It is the required field. Return Value: This function does not return anything. Example: In this example, we will implement the window.scrollTo() method on clicking a button. html <body style="width: 5000px; height: 5000px; margin-left: 260px;"> <h1 style="color:green;"> GeeksforGeeks </h1> <h2> Window scrollTo() Method </h2> <p> A computer science portal for geeks. </p> <button onclick="geek()">Click to scroll!</button> <script> function geek() { //Scrolling the document to position "250" //horizontally and "110" vertically window.scrollTo(250, 110); } </script> </body> Output: We have a complete list of HTML DOM methods, to check those please go through the DOM Complete Reference article. Supported Browsers: The browser supported by the Window scrollTo() Method are listed below: Google Chrome 1 and aboveEdge 12 and aboveInternet Explorer 4 and aboveFirefox 1.0 and aboveOpera 4 and aboveSafari 1 and above Comment More infoAdvertise with us Next Article Javascript Window scrollTo() Method V Vishal Chaudhary 2 Follow Improve Article Tags : JavaScript javascript-functions Similar Reads HTML Window scrollBy() method The window.scrollBy() method is used to scroll the document by a given number of pixels. Syntax: window.scrollBy( xcoordinate, ycoordinate ); or window.scrollBy(options); Parameters: This method accepts two parameters as mentioned above and described below: x-coordinate: It is the horizontal pixel v 2 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 JavaScript ScrollLoopMenu Plugin In this article, we will learn how to implement the Scrolling Loop Menu using JavaScript-based ScrollLoopMenu plugin. It is another type of simple and interactive scrolling menu used in developing web pages for getting some nice visual effects.Note: Please download the JavaScript ScrollLoopMenu plug 2 min read jQuery scroll() Method The jQuery scroll() is an inbuilt method which is used to user scroll in the specified element. This method works for all scrollable elements and the browser window. Syntax:$(selector).scroll(function)Parameter: This method accepts single parameters function which is optional. It is used to specify 2 min read How to Scroll to Bottom of Div in JavaScript ? Scrolling to the bottom of a div is a common task in web development, especially when dealing with chat applications, message boards, or any content where new information is frequently added at the bottom. There are several approaches to scrolling to the bottom of the div in JavaScript which are as 4 min read Like