QQ微信内置浏览器判断

```

/**

* 是否为QQ内置或者微信内置浏览器

*/

isQqOrWechat: function(){

    var ua = window.navigator.userAgent.toLowerCase();

    if(ua.match(/MicroMessenger/i) == 'micromessenger'){

        // alert("是微信浏览器");

        return 'wechat';

    }else if(ua.match(/QQ/i) == 'qq'){

        // alert("是QQ浏览器");

        return 'qqmobile';

    }else{

        return false;

}

},

```

你可能感兴趣的:(QQ微信内置浏览器判断)