zoukankan      html  css  js  c++  java
  • 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>

  • 相关阅读:
    ruby学习系列(1)
    学习调用WCF服务的各种方法
    Web Service简介
    ajax编程
    ReportView控件的使用
    .NET中26个优化性能方法
    图书管理前端页面
    图书管理后端接口
    Vue组件
    axios登录前端
  • 原文地址:https://www.cnblogs.com/simadongyang/p/7541702.html
Copyright © 2011-2022 走看看