Wechat browser return key how to prevent him from returning to the previous interface

Wechat browser returns how the key prevents him from returning to the previous interface, and then

clipboard.png

Apr.20,2021

call Zhang Xiaolong to change the source code


maybe it's not called back,. It's different from webview. Check for yourself

window.addEventListener("back", e => e.preventDefault())

you can specify the url, code to jump when you click the back button as follows:

      pushHistory();
      window.addEventListener("popstate", function(e) {
          window.location.href='aaaaa.html';//
      }, false);

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

implementation principle reference: HTML5 pushstate, popstate operation history

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b016-34627.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b016-34627.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?