“window.scrollto(0,0)” Code Answer’s

In the document, the Window scrollto ( ) method is used to scroll to a particular set of coordinates. Factually, this method accepts two parameters given below:
x-coord: A pixel along the horizontal axis of the document that is shown in the upper left.
y-coord: A pixel along the vertical axis of the document that is shown in the upper left.

js scrollto

on Jan 01, 1970
element.scrollTo(x, y);
window.scrollTo(x, y);
element.scrollTo({
  top: 100,
  left: 100,
  behavior: 'smooth'
});

Add Comment

0

window.scroll

on Jan 01, 1970
scroll function

window.scroll({
 top: 0, 
 left: 0, 
 behavior: 'smooth' 
});

window.scroll(x-coord, y-coord)
window.scroll(options)

Add Comment

0

This method is used when you want to scroll the document or a webpage by a specified number of pixels. The scrollbar of a document or webpage has two positions scroll left and scroll top to retrieve its position.

Javascript answers related to "window scrollto"

View All Javascript queries

Javascript queries related to "window scrollto"

Browse Other Code Languages

CodeProZone