WeChat closed
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> <script> wx.config({ debug: false, appId: '<?php echo $signPackage["appId"];?>', timestamp: '<?php echo $signPackage["timestamp"];?>', nonceStr: '<?php echo $signPackage["nonceStr"];?>', signature: '<?php echo $signPackage["signature"];?>', jsApiList: [ 'closeWindow' ] }); wx.ready(function () { document.querySelector('#binding_submit').onclick = function () { wx.closeWindow(); } }); </script>
IE, firefox closed
function f_close(){ if (navigator.userAgent.indexOf("MSIE") > 0) { if (navigator.userAgent.indexOf("MSIE 6.0") > 0) { window.opener = null; window.close(); } else { window.open('', '_top'); window.top.close(); } } else if (navigator.userAgent.indexOf("Firefox") > 0) { window.location.href = 'about:blank '; //window.history.go(-2); } else { window.opener = null; window.open('', '_self', ''); window.close(); } }
ss