两种方式: // 方式一 触发返回上一层页面事件,只会重新加载当前页面 window.addEventListener('pageshow', function(e) { if (e.persisted) { location.reload(); } }) // 方式二 不会出现刷新效果 history.pushState(null, null, document.URL); window.addEventListener('popstate', function(e) { history.pu…