方法一:

 

pushHistory();

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

if (typeof window.addEventListener != "undefined") {
    window.addEventListener("popstate", function (e) {
        WeixinJSBridge.call('closeWindow');
    }, false);
} else {
    window.attachEvent("popstate", function (e) {
        WeixinJSBridge.call('closeWindow');
    });
}

 

相关文章:

  • 2021-09-23
  • 2021-08-24
  • 2021-09-10
  • 2021-08-24
  • 2021-08-21
  • 2022-01-13
  • 2022-02-07
  • 2021-11-04
猜你喜欢
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
  • 2021-05-19
  • 2021-12-10
  • 2022-12-23
  • 2021-06-25
相关资源
相似解决方案