var ua = Navigator.userAgent.toLowerCase ();
var android = String (Ua.match (/android/i)) = = "Android";
var ipad = String (Ua.match (/ipad/i)) = = "ipad";
var iphone = String (Ua.match (/iphone/i)) = = "iphone";
var url = window.location.pathname;
var search = Window.location.search;
var hash = Window.location.hash;
if (Android | | iPhone) && url.indexof (' inquiry ') = =-1 && url.indexof (' challenge-about ') = =-1) {
window.location = ' www.baidu.com ';
};
Judge inside iOS and Android
function Isweixin () {
var ua = Navigator.userAgent.toLowerCase ();
if (Ua.match (/micromessenger/i) = = "Micromessenger") {
return true;
} else {
return false;
}
}
function Isios () {
var u = navigator.userAgent.toLowerCase ();
if (u.indexof (' iphone ') >-1 | | u.indexof (' ipod ') >-1) {
return true;
}
return false;
}
Determine whether the
if (Isweixin ()) {
Determine the iOS system inside
if (Isios ()) {
}else{
}
}else {
Judging is not
Judge not on the iOS system
if (Isios ()) {
}else{
}
}
PC WAP judgment Browser UA properties