实现页面回退刷新?

  • 旧: window.history.back() + window.location.href=document.referrer;

  • 新: HTML5的新API扩展了window.history,使历史记录点更加开放了。可以存储当前历史记录点、替换当前历史记录点、监听历史记录点onpopstate, replaceState

 

posted @ 2020-12-18 14:43  咔啡  阅读(137)  评论(0编辑  收藏  举报