Development and realization of micro-credit public number click the Return button to return to the chat interface _javascript tips

Source: Internet
Author: User

Don't say much, see code

Pushhistory ();
  function Pushhistory () {var state = {title: "title", url: "#"};
Window.history.pushState (state, "title", "#"); } if (typeof Window.addeventlistener!= "undefined") {Window.addeventlistener ("Popstate", function (e) {WEIXINJSBR
  Idge.call (' CloseWindow ');
}, False);
  else {window.attachevent ("Popstate", function (e) {weixinjsbridge.call (' CloseWindow ');
});
    } pushhistory ();
      function Pushhistory () {var state = {title: "title", url: "#"};
    Window.history.pushState (state, "title", "#"); } $ (function () {wx.config ({debug:false,//Open debug mode, the return value of all invoked APIs is alert to the client, to view incoming parameters, can be opened on the PC side, and parameter information is passed
        Log is typed and will print only on the PC side. AppId: ' @ViewBag. AppId ',//required, unique identification of public number timestamp: ' @ViewBag. Timestamp ',//required, generate signature timestamp noncestr: ' @ViewBa G.noncestr ',//must fill, generate signed random string signature: ' @ViewBag. Signature ',//required, signed, see Appendix 1 jsapilist: [' Check
         Jsapi ',   ' Hideoptionmenu ', ' scanqrcode ', ' closewindow ']//required, need to use the JS interface list, all JS interface list See Appendix 2
      });
      Wx.ready (function () {wx.hideoptionmenu ();
      }); if (typeof Window.addeventlistener!= "undefined") {Window.addeventlistener ("Popstate", function (e) {W
        X.closewindow ();
      }, False);
        else {window.attachevent ("Popstate", function (e) {Wx.closewindow ();
      }); }
    });

Above is the entire content of this article, I hope the content of this article for everyone's study or work can bring some help, but also hope that a lot of support cloud Habitat community!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.