网页防止后退,禁止点击左上角的< <script language="javascript"> //防止页面后退 history.pushState(null, null, document.URL); window.addEventListener('popstate', function () { history.pushState(null, null, document.URL); }); </script> 注:程序写完后找bug,一定注意浏览器网址,容易出现Bug