Html 正在撤消历史记录。replaceState(…)

Html 正在撤消历史记录。replaceState(…),html,pushstate,Html,Pushstate,如果我的应用程序运行在http://example.com我可以使用以下功能: window.history.replaceState({}, null, '#5') 使用http://example.com/#5 是否可以撤消此操作?使用JS,我可以将地址栏返回到其原始状态吗?您不想再次使用history.replaceState吗?我可以再次使用它,但是history.replaceState({},null',)没有这样做。

如果我的应用程序运行在
http://example.com
我可以使用以下功能:

window.history.replaceState({}, null, '#5')
使用
http://example.com/#5


是否可以撤消此操作?使用JS,我可以将地址栏返回到其原始状态吗?

您不想再次使用
history.replaceState
吗?我可以再次使用它,但是
history.replaceState({},null',)
没有这样做。