function isWeiXin(){ var ua = window.navigator.userAgent.toLowerCase(); if(ua.match(/MicroMessenger/i) == 'micromessenger' || ua.match(/_SQ_/i) == '_sq_'){ return true; }else{ return false; } }
文章转自:https://www.cnblogs.com/xiaojiu9/p/4520903.html