<script>
alert(navigator.platform
) ; Get service-side devices!
</script>
Note here the Mobile_device_detect ("Http://***.***.com");//The address is filled with the address of your mobile website. <script language= "JavaScript" >functionmobile_device_detect (URL) {varthisos=Navigator.platform; varos=NewArray ("IPhone", "IPod", "IPad", "Android", "Nokia", "SymbianOS", "Symbian", "Windows Phone", "Phone", "Linux armv71", " MAUI "," untrusted/1.0 "," Windows CE "," BlackBerry "," Iemobile "); for(vari=0;i<os.length;i++) { if(Thisos.match (Os[i])) {window.location=URL;} } //because quite a part of the cell phone system does not know the information, here is to do temporary special identification if(Navigator.platform.indexOf (' IPad ')! =-1) {window.location=URL;} //This is partly because the core of the Android phone is also Linux //but navigator.platform display information is different, so from the browser, that is, using navigator.appversion information to make judgments varCheck =navigator.appversion; if(Check.match (/linux/i)) {//X11 is a platform for UC browsers and can be attached if other special browsers are available if(Check.match (/mobile/i) | | Check.match (/x11/i)) {window.location=URL; } } //class In_array functionArray.prototype.in_array =function(e) { for(i=0;i< This. length;i++) { if( This[I] = =e)return true; } return false; }} Mobile_device_detect ("Http://***.***.com");</SCRIPT>
Mobile phone access to the PC website automatically jump mobile phone website code