Is there is a way how to add hash # to my URL without redirect?
window.location.hash = 'something';
Hi, what I really need is to add only the hash... something like this:
window.location.hash = '#';but in this way nothing is added.
window.location = '#';
Also, don't forget about the
<a href="#something">Add '#something' to URL</a>
Or, to take your question more literally, to just add '#' to the URL:
<a href="#">Add '#' to URL</a>
window.location.hash = 'whatever';
©2020 All rights reserved.