JS返回上一页

window.history.go(-1);  //返回上一页
window.history.back();  //返回上一页
//如果要强行刷新的话就是:window.history.back();location.reload();
window.location.go(-1); //刷新上一页

例子:

<button onclick="history.back()">
    返回
</button>

 

© 版权声明
THE END
喜欢就支持一下吧
点赞5 分享
抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容