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>

  • 相关阅读:
    AWK 学习手札之一: an AWK tutorial
    SQL语句教程学习笔记之一
    c#支付宝支付
    table隔行变色
    读取接口
    倒计时
    新建的mvc项目运行之后报错找不到页面
    sql向表中添加字段
    取小数点后面几位数
    H5拨打电话
  • 原文地址:https://www.cnblogs.com/simadongyang/p/7541702.html
Copyright © 2011-2022 走看看