function closePage()
{
var userAgent = navigator.userAgent;
if (userAgent.indexOf(“Firefox”) != -1 || userAgent.indexOf(“Chrome”) !=-1) {// Firefox或Chrome中关闭
window.location.href = “about:blank”;
} else {
window.opener = null;
window.open(“”, “_self”);
window.close();
}
if (WeixinJSBridge) {// 微信中关闭
WeixinJSBridge.call(‘closeWindow’);
}
}