判断通过微信、支付宝还是百度钱包扫一扫进入的H5页面

//判断是否是微信浏览器

varisWechat=false;

UA=navigator.userAgent.toLowerCase();

if(UA.match(/MicroMessenger/i)=="micromessenger"){

isWechat=true;

}

alert(isWechat);

//判断是否是支付宝扫一扫

varisAlipay=false;

if(UA.match(/alipayclient/i)=="alipayclient"){

isAlipay=true;

}

alert(isAlipay);

//判断是否是百度钱包扫一扫

varisBaiduwallet=false;

if(UA.match(/baiduwallet/i)=="baiduwallet"){

isBaiduwallet=true;

}

alert(isBaiduwallet);