Js中返回上一页的代码总结
history.back(-1):直接返回当前页的上一页 不刷新
history.go(-1):也是返回当前页的上一页 不刷新
window.location.replace(document.referrer) 会刷新
window.location.href=“上一个页面URL” 会刷新
Js中返回上一页的代码总结
history.back(-1):直接返回当前页的上一页 不刷新
history.go(-1):也是返回当前页的上一页 不刷新
window.location.replace(document.referrer) 会刷新
window.location.href=“上一个页面URL” 会刷新