代码如下:

function is_weixin() {
    var ua = navigator.userAgent.toLowerCase();
    return ua.match(/MicroMessenger/i) == "micromessenger" ? true : false;
}

如果函数返回true,则是微信浏览器,反之。

相关文章:

  • 2021-11-22
  • 2022-12-23
  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2021-12-17
猜你喜欢
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2022-12-23
  • 2021-06-28
  • 2022-12-23
相关资源
相似解决方案