Method 1
<script>
if (navigator.platform.indexOf (' Win32 ')!=-1) {
Pc
Window.location.href= "PC-side website address";
}else{
Cell phone
window.location.href= "mobile website address";
}
</script>
Method 2
<script type= "Text/javascript" >
function Browserredirect () {
var suseragent= navigator.userAgent.toLowerCase ();
var bisipad= suseragent.match (/ipad/i) = = "ipad";
var bisiphoneos= suseragent.match (/iphone os/i) = = "iphone OS";
var bismidp= suseragent.match (/midp/i) = = "MIDP";
var bisuc7= suseragent.match (/rv:1.2.3.4/i) = = "rv:1.2.3.4";
var bisuc= suseragent.match (/ucweb/i) = = "UCWeb";
var bisandroid= suseragent.match (/android/i) = = "Android";
var bisce= suseragent.match (/windows ce/i) = = "Windows CE";
var biswm= suseragent.match (/windows mobile/i) = = "Windows Mobile";
if (Bisipad | | bisiphoneos | | bismidp | | bIsUc7 | | bisuc | | bisandroid | | bisce | | biswm) {
Window.location.href= ' mobile website address ';
} else {
Window.location= ' PC-side website address ';
}
}
Browserredirect ();
</script>
Automatic detection, the PC side and the mobile side to jump to the corresponding address when the page opens