JS判断手机浏览器内核

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

  

posted @ 2018-12-07 15:51  大da脸  阅读(1077)  评论(0编辑  收藏  举报