+ 1
What is the "go up the page" function?
I am at the bottom of an web page. I want to go to the very up. I see the button "go up", I click on it and it takes me up to the begging. How can I make such a button in HTML? What's the code/name of a function to this?
4 ответов
+ 1
You create a button and bind its onclick to window.scrollTo().
https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollTo
+ 1
Thank you, I will try this!
+ 1
Do I locate the
<a name="top"></a>
Inside the /head or just after the
/body tag?
+ 1
Ok, thank you, I will try this!