function isWeiXinOrQQ(){ var ua = window.navigator.userAgent.toLowerCase(); if(ua.match(/MicroMessenger/i) == 'micromessenger' || ua.match(/\sqq/i) == " qq"){ return true; }else{ return false; } }