js判断是微信、QQ内置浏览器打开页面

function is_weixn_qq(){
var ua = navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i)=="micromessenger") {
return "weixin";
} else if (ua.match(/QQ/i) == "qq") {
return "QQ";
    }
return false;
}  

猜你喜欢

转载自blog.csdn.net/u011380813/article/details/78447442