Forum Moderators: open
i know how to make HTML buttons, but i want to make a button that jumps to an anchor.
If you are wanting to make an input (type="button") jump to an internal anchor then you could do something like:
<input type="button" value="Jump to Anchor" onclick="location.href='#anchor'">
However, this is not really what buttons are intended for and more importantly it is not usually what the user is expecting; as this is what anchors are for. And it relies on JavaScript to work.
surrealillusions suggestion is better.
<form action="http://www.example.com/page.html#HERE"><input type="submit" value="Jump to HERE"></form>
This reverts to a get method for the form, so the result in the address bar will be
http://www.example.com/page.html?#HERE