如何在jQuery中替换当前页面的URL?

如何在jQuery中替换当前页面的URL?,jquery,url,replace,anchor,Jquery,Url,Replace,Anchor,我有: 代码应发出警告: #我的部分 谢谢。使用window.location.hash alert(window.location.hash); 可能重复的

我有:

代码应发出警告:

#我的部分


谢谢。

使用
window.location.hash

alert(window.location.hash);
可能重复的