最佳答案
我有URL像:http://example.com#something
,我如何删除#something
,而不导致页面刷新?
我尝试了以下解决方案:
window.location.hash = '';
但是,这不会从URL中删除哈希符号#
。