怎样判断当前浏览器是不是微信的浏览器呢?

function  isWeiXin(){
var ua=window.navigator.userAgent.toLowerCase()
if(ua.match(/MicroMessenger/i)=='micromessenger'){
是微信浏览器
return  true
}else{
不是微信浏览器
return false
}

你可能感兴趣的:(笔记,项目工作,微信,前端,javascript)