通常判断运行环境都是通过navigator.userAgent

if (/android/gi.test(navigator.userAgent)){
// todo : android
}

if (/ipad|iphone|mac/gi.test(navigator.userAgent)){
// todo : ios
}

 

 

 

<script>

$(function() {
var isIOS = (/iphone|ipad/gi).test(navigator.appVersion);
if (isIOS) {

}
});
</script>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
相关资源
相似解决方案