判断是否为微信环境下打开的网页
时间:2018-12-04 20:05:14
收藏:0
阅读:437
非微信浏览器条件下隐藏某些东西:
function isWeiXin(){ var ua = window.navigator.userAgent.toLowerCase(); if(ua.match(/MicroMessenger/i) == ‘micromessenger‘ || ua.match(/_SQ_/i) == ‘_sq_‘){ return true; }else{ document.getElementById("follow").style.visibility="hidden"; return false; } } isWeiXin();
评论(0)