【发布时间】:2012-12-05 16:11:06
【问题描述】:
可能重复:
How to remove the hash from window.location with JavaScript without page refresh?
当关闭幻灯片时,我不希望地址恢复正常,但“#”仍然存在,有什么办法可以解决这个问题吗?
【问题讨论】:
标签: javascript jquery hash
可能重复:
How to remove the hash from window.location with JavaScript without page refresh?
当关闭幻灯片时,我不希望地址恢复正常,但“#”仍然存在,有什么办法可以解决这个问题吗?
【问题讨论】:
标签: javascript jquery hash
来自https://developer.mozilla.org/en/DOM/window.location:
例子
每当位置对象的属性被修改时,一个文档 将使用 URL 加载,就好像 window.location.assign() 已经 使用修改后的 URL 调用。
我认为这个问题解决了你想要使用 jQuery 的问题:
Change hash without reload in jQuery
其他相关问题:
Change the URL in the browser without loading the new page using JavaScript
How to remove the hash from window.location with JavaScript without page refresh?
How can I change Firefox window.location.hash without creating a page reload?
【讨论】: