关闭当前窗口
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
本文来自博客园,作者:每天都要学一点,欢迎讨论和转载,转载请注明原文链接:https://www.cnblogs.com/yanan7890/p/8391023.html