Window.onload = function () {
var system ={
Win:false,
Mac:false,
Xll:false
};
var p = navigator.platform;
System.win = P.indexof ("win") = = 0;
System.mac = P.indexof ("mac") = = 0;
system.x11 = (P = = "X11") | | (P.indexof ("Linux") = = 0);
var iOS = document.getElementById ("ios");
var andriod = document.getElementById ("Andriod");
if (system.win| | system.mac| | SYSTEM.XLL) {
Ios.style.right = 460+ "px";
Ios.style.bottom = 120+ "px";
Andriod.style.right = 330+ "px";
Andriod.style.bottom = 120+ "px";
}else{
var suseragent = Navigator.userAgent.toLowerCase ();
var Isios = Suseragent.match (/mac/i) = = "Mac";
var isiphone = Suseragent.match (/iphone/i) = = "iphone";
var isipad = Suseragent.match (/ipad/i) = = "ipad";
var isandroid = Suseragent.match (/android/i) = = "Android";
if (isandroid) {
window.location.href= ' http://api.eguotong.cn/download/android.apk ';
}else if (Isios | | isipad | | isiphone) {
window.location.href= ' https://appsto.re/cn/4NI-2.i ';
}else {
Ios.style.right = 460+ "px";
Ios.style.bottom = 120+ "px";
Andriod.style.right = 330+ "px";
Andriod.style.bottom = 120+ "px";
}
}
JS to determine whether access to this page is win or Android iOS source