I'm writing a code in HTML and it has 2 buttons, say a
and b
. I want to pass something in my URL that will trigger the button. I know how we do it for div.
<div class="a">
<a name="a" /> This is Div A
</div>
<div class="b">
<a name="b" /> This is Div B
</div>
and I can directly pass myURL.com#a
/myURL.com/#b
, to go to that div. But I want to know if I can do it using buttons.
Thanks