本文最后更新于2019-10-30,已超过 1年没有更新,如果文章内容、图片或者下载资源失效,请留言反馈,我会及时处理,谢谢!
温馨提示:本文共421个字,读完预计2分钟。
var u = navigator.userAgent;
if (is_weixin() && u.indexOf('Android') > -1) {//安卓手机
} else if(is_weixin() && u.indexOf('Linux') > -1){//安卓手机
}else if(is_weixin() && u.indexOf('iPhone') > -1){//苹果手机
}else if (u.indexOf('Windows Phone') > -1) {//winphone手机
}
//是否在微信内打开
function is_weixin() {
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == "micromessenger") {
return true;
} else {
return false;
}
}