js判断pc还是移动端

if (!/windows phone|iphone|android/ig.test(window.navigator.userAgent)) {
      //pc                    
}else{
       //h5    
 }

猜你喜欢

转载自www.cnblogs.com/panyujun/p/10469605.html