js 判断是否为微信浏览器

in 前端JavaScript with 0 comment
function is_weixn(){
    var ua = navigator.userAgent.toLowerCase();
    if(ua.match(/MicroMessenger/i)=="micromessenger") {
        return true;
    } else {
        return false;
    }
}
Comments are closed.