var ua = navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i)=="micromessenger") {
//return "weixin";
alert("微信")
} else if (ua.match(/QQ/i) == "qq") {
//return "QQ";
alert("QQ")
}else {
return false;
alert("不是微信浏览器或手机qq浏览器");
}
2022-12-04 08:17:21
var ua = navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i)=="micromessenger") {
//return "weixin";
alert("微信")
} else if (ua.match(/QQ/i) == "qq") {
//return "QQ";
alert("QQ")
}else {
return false;
alert("不是微信浏览器或手机qq浏览器");
}