I want to be able to do something in Javascript when I click on a button, but onclick I want to scroll to a specific place.
I can do it if I use <a></a> like this
<a href="#cell">click</a>
<a name="cell"></a>
but I want to do that when using a button like this
<input type="button" onclick="doSomthing()" />
I want, when clicking that button, to do the same thing like in the <a> example I gave above.
1 Answer