<!doctype html>
<html><head><meta charset="utf-8"><title>判断是否是微信浏览器-jq22.com</title><script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script><style></style></head><body><p id="rs"></p><script>function is_weixin() { var ua = window.navigator.userAgent.toLowerCase(); if (ua.match(/MicroMessenger/i) == 'micromessenger') { $("#rs").text("微信浏览器"); } else { $("#rs").text("不是微信浏览器"); } }is_weixin();</script></body></html>