跳转到内容

利用js实现 禁用浏览器后退

JavaScript
 <script language="javascript">
    //防止页面后退
    history.pushState(null, null, document.URL);
    window.addEventListener('popstate', function () {
    history.pushState(null, null, document.URL);
   });
 </script>