//判断是支付宝app的浏览器
 var userAgent = navigator.userAgent.toLowerCase();

    if(userAgent.match(/Alipay/i)=="alipay"){
        return true;
    }else{
        return false;
    }



//判断是微信app的浏览器
function isWechat(){
    var userAgent = navigator.userAgent.toLowerCase();

    if(userAgent.match(/MicroMessenger/i)=="micromessenger") {
        return true;
    } else {
        return false;
    }
}

http://blog.csdn.net/xiejunna/article/details/74989704

标签: JS

添加新评论