How can I use javascript to reload page and go to a specific div when a button is clicked?
function reloadAgreement() {
location.reload();
}
<li><a href="" onclick="reloadAgreement();">Return to Store Info</a></li>
function gototab(reload)
{
window.location.hash = '#tab2';
window.location.reload(true);
}
Return to Store Info
from here Reload page with different anchor
edit:
To clarify, the section that says "#tab2" is the 'id' attribute of the div you want the page to go to when the link is clicked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With