zoukankan      html  css  js  c++  java
  • 微信公众号监听返回事件

     $(function(){
            if (window.history && window.history.pushState) {
                window.addEventListener("popstate", function (e) {  //回调函数中实现需要的功能
                    // alert("我监听到了浏览器的返回按钮事件啦");
                    window.location.href = 'index.html?id=' + F_EmployeeId + '&AppId=' + localStorage.getItem('AppId');  //在这里指定其返回的地址
                }, false);

                !function () {

                    var state = {
                        title: "title",
                        url: "#"
                    };
                    window.history.pushState(state, "url", "#");
                }();

            }

        });

  • 相关阅读:
    vim python extension
    aws msk
    Install python3
    sns
    inventory
    批量添加监听端口
    template screen
    DNS name
    add jar and proxy repo
    模型诊断论文心得
  • 原文地址:https://www.cnblogs.com/zhouxiaobai/p/11935200.html
Copyright © 2011-2022 走看看