判断是从微信进入还是企业微信进入

时间:2018-12-17 14:34:43   收藏:0   阅读:1107

<script>
var ua= window.navigator.userAgent.toLowerCase();
if( (ua.match(/MicroMessenger/i) == ‘micromessenger‘) && (ua.match(/wxwork/i) == ‘wxwork‘) ){
alert("企业微信客户端");
}else if( ua.match(/micromessenger/i) == ‘micromessenger‘ ){
alert("微信客户端");
}
</script>
---------------------

原文:https://blog.csdn.net/hrf368246980/article/details/83055671

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!