• jq 监听返回事件


        <script>

     $(document).ready(function(e) {
                var counter = 0;
                if (window.history && window.history.pushState) {
                                 $(window).on('popstate', function () {
                                                window.history.pushState('forward', null, '#');
                                                window.history.forward(1);
                                              alert("不可回退");
                                              //window.location="./c.html";
                                    });
                  }

                  window.history.pushState('forward', null, '#'); //在IE中必须得有这两行
                  window.history.forward(1);
    });
        </script>

  • 相关阅读:
    二叉树的遍历
    深度优先遍历和广度优先遍历
    N的阶乘末尾有多少个0
    框架产生的历史
    Ansible--初始ansible
    日积跬步05
    日积跬步04
    日积跬步03
    日积跬步02
    日积跬步01
  • 原文地址:https://www.cnblogs.com/simadongyang/p/7541702.html
Copyright © 2020-2023  润新知