var ua = navigator.userAgent.toLowerCase();    
    if (/iphone|ipad|ipod/.test(ua)) {
            //alert("iphone");        
    } else if (/android/.test(ua)) {
            alert("android");    
    }

 

 

/*判断设备*/
var ss = navigator.userAgent.toLowerCase();

if(ss.indexOf("fhmall_android") > 0) {
    native_flag = 0;
} else if(ss.indexOf("fhmall_ios") > 0) {
    native_flag = 1;
} else {
    native_flag = -1;
}

 

 

if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
    //alert(navigator.userAgent);  
    window.location.href ="iPhone.html";
} else if (/(Android)/i.test(navigator.userAgent)) {
    //alert(navigator.userAgent); 
    window.location.href ="Android.html";
} else {
    window.location.href ="pc.html";
};

 

 

if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
                window.location.href ="https://itunes.apple.com/cn/app/1hao-yao-dian/id727578007?mt=8";
        } else if (/(Android)/i.test(navigator.userAgent)) {
                window.location.href ="https://itunes.apple.com/cn/app/1hao-yao-dian/id727578007?mt=8";
        } else {
                 window.location.href ="http://www

 

 

http://caibaojian.com/browser-ios-or-android.html

 

相关文章:

  • 2022-01-04
  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
  • 2021-12-03
  • 2021-12-06
  • 2021-06-19
  • 2021-10-19
相关资源
相似解决方案