js返回页面并刷新页面数据

通常我们控制返回页面使用window.history.back() 或者 window.history.go(-1).但是这样的后退方式,不并不能满足刷新数据的需求.

解决方法
window.location.href = document.referrer

document.referrer的注意事项

==如果当前文档不是通过超级链接访问的,则为 null。==

评论

暂无评论