Fortune Telling Collection - Fortune-telling birth date - How does the webpage code judge that the browser jumps to a different website?

How does the webpage code judge that the browser jumps to a different website?

Code to determine whether Android or IOS jumps to a different page address:

& lt script & gt

var u = navigator.userAgent

var num _ sing 1 = 0;

var isan droid = u . index of(' Android ')& gt; - 1 | | u . index of(' Adr ')& gt; - 1;

var isiOS =! ! u.match(/\(i[^; ]+; (U; )? CPU。 +Mac OS X/);

$("#imgTc ")。 Click (function () {

num _ sing 1++;

if(isAndroid){

if(num _ sing 1 & gt; 1){

Window.location.replace("/ fortune teller www.fs58.com ");

} Otherwise {

_ai_analysis(['trackEvent',' button',' download'], function () {

Alarm (1 1)

Window.location.replace("/ fortune teller www.fs58.com ");

})

}

}

if(isiOS){

if(num _ sing 1 & gt; 1){

Window.location.replace ("fortune teller m.fs58.com");

} Otherwise {

_ai_analysis(['trackEvent',' button',' download'], function () {

Alarm (22)

Window.location.replace ("fortune teller m.fs58.com");

});

}

}

if (is_weixn()) {

Alert ("Please click the button in the upper right corner and click to open it with a browser");

}

The function is _ weixin () {

var ua = navigator . user agent . tolowercase();

if(ua . match(/micro messenger/I)= = " micro messenger "){

Return true

} Otherwise {

Returns false

}

}

});

& lt/script & gt;

100% availability has been tested!