非微信浏览器条件下隐藏某些东西:
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();