這個(gè)問題是最近遇到的
解決方案我百度的并測試有效
// 如果你希望用戶不用有返回功能 可縮寫如下 或使用location.replace('url')跳轉(zhuǎn)鏈接history.pushState(null, null, document.URL);window.addEventListener('popstate', function () { history.pushState(null, null, document.URL);});
注:上面的代碼是禁止頁面返回,其中document.URL可以指定頁面的鏈接來跳轉(zhuǎn)。
<script>// 如果你希望用戶不用有返回功能 可縮寫如下 或使用location.replace('url')跳轉(zhuǎn)鏈接 history.pushState(null, null, document.URL);window.addEventListener('popstate', function () { history.pushState(null, null, location.replace('http://www.survivalescaperooms.com'));});</script>
新聞熱點(diǎn)
疑難解答
圖片精選