window.location.hash = 'something';
这只是简单的JavaScript.
Your comment...
Hi, what I really need is to add only the hash... something like this:
window.location.hash = '#';
but in this way nothing is added.
Try this...
window.location = '#';
另外,不要忘记window.location.replace()
法.