打赏

关闭当前窗口

 windows:不会

    window.close();不起作用,windows下也报Scripts may close only the windows that were opened by it.

 

 微信:WeixinJSBridge.call('closeWindow');

  或者引入<script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>调用wx.closeWindow();

    只适用微信,其它入口比QQ里进入都关闭不了,报Uncaught ReferenceError: WeixinJSBridge is not defined

 

posted @ 2018-01-31 10:37  每天都要学一点  阅读(306)  评论(0编辑  收藏  举报