function isPc(){
    if( navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/Windows Phone/i) ){
        console.log('移动端');
    }else{
        console.log('pc端');               
    }
}
isPc();

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-26
  • 2021-09-06
  • 2021-09-20
  • 2022-12-23
  • 2021-08-29
  • 2021-11-26
相关资源
相似解决方案