Javascript

关闭微信网页

2017-05-11  本文已影响8人  0efb885b580c
关闭
history.pushState({page : 'state2'},'state','#state2');
window.onpopstate = function(event) {
       if (event.state.page === 'state1') {
              WeixinJSBridge.call('closeWindow');
       }
 }
history.pushState({page : 'state1'},'state','#state1');
上一篇下一篇

猜你喜欢

热点阅读