标签:inxi mic color return strong agent gen function weixin
方案一:推荐
var ua = navigator.userAgent.toLowerCase();
var isWinxin = ua.indexOf(‘micromessenger‘) != -1;
if(isWinxin){
return true;
}else{
return false;
}
方案二:
function is_weixin(){
var ua = navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i) == ‘micromessenger‘){
return true;
}else{
return false;
}
}
搬运代码http://www.cnblogs.com/wenzheshen/p/6018976.html
标签:inxi mic color return strong agent gen function weixin
原文地址:http://www.cnblogs.com/liuqingxia/p/7723222.html