比如我现在在C页面,点浏览器后退是退回到B页面,我现在想直接从C页面后退到A页面,这个该怎么实现?
在从 b 到 c 的时候用 window.location.replace(url)
代替 window.location.href = url
。如果原来是直接的 <a href="xxx">xxxxxxx</a>
,就改成 href=javascript:window.location.replace("xxx");
比如我现在在C页面,点浏览器后退是退回到B页面,我现在想直接从C页面后退到A页面,这个该怎么实现?
在从 b 到 c 的时候用 window.location.replace(url)
代替 window.location.href = url
。如果原来是直接的 <a href="xxx">xxxxxxx</a>
,就改成 href=javascript:window.location.replace("xxx");