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