[html] html5点击返回键怎样不让它返回上一页?

   $(function() {
    if (window.history && window.history.pushState) {
       $(window).on('popstate', function () {
       window.history.pushState('forward', null, '#');
       window.history.forward(1);
       });
    }
    window.history.pushState('forward', null, '#'); //在IE中必须得有这两行
    window.history.forward(1);
    })

个人简介

我是歌谣,欢迎和大家一起交流前后端知识。放弃很容易,
但坚持一定很酷。欢迎大家一起讨论

主目录

与歌谣一起通关前端面试题