liuph

 

 

1         var ua = navigator.userAgent.toLowerCase();
2         if (ua.match(/MicroMessenger/i) == "micromessenger"
3         || ua.match(/iphone os/i) == "iphone os" || ua.match(/ipad/i) == "ipad"
4         || ua.match(/android/i) == "android" || ua.match(/midp/i) == "midp"
5         || ua.match(/rv:1.2.3.4/i) == "rv:1.2.3.4" || ua.match(/ucweb/i) == "ucweb"
6         || ua.match(/windows ce/i) == "windows ce" || ua.match(/windows mobile/i) == "windows mobile") {
7            alert("移动端");8         }

 

分类:

技术点:

相关文章:

  • 2021-12-07
  • 2021-07-31
  • 2021-11-20
  • 2022-12-23
  • 2021-11-26
  • 2021-11-26
  • 2021-07-03
  • 2022-12-23
猜你喜欢
  • 2021-11-26
  • 2022-02-05
  • 2022-12-23
  • 2021-11-26
  • 2021-10-09
  • 2021-05-10
  • 2021-11-26
相关资源
相似解决方案