I want to make the browser to scroll the div's id
<div id="test">
   lol
</div> 
So I use this code
window.location = "#test";
but my url now is like this
http://locahost/index.html#test
Is it possible to delete "#test" but go to that ?
Scroll to the element:
document.querySelector('#test').scrollIntoView();
                        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