Hi, I'm a new to javascript. I have a javascript function, and I want to instruct it to go to the top of the page, like in HTML #top . What is the way to perform it? Thanks in advance.
You can use: window.scroll(0,0) Causes the window to scroll to the specified x- and y-offset at the upper-left corner of the window. Syntax: window.scroll(x,y)