Because the phone and the computer resolution is different, so sometimes browse the web when you need to distinguish between mobile phone browsing or computer browsing, and then point to the specified page display, the following is the JS distinguish code.
<script type= "Text/javascript" >
platforms, devices, and operating systems
var system ={
Win:false,
Mac:false,
Xll:false
};
Http://dict.baidu.com/s?wd=%E6%B4%9B%E4%B8%BD%E8%AF%97+%E4%BD%A0%E7%9A%84%E9%80%89%E6%8B%A9+%E6%89%BE%E5%9B%9E %e8%87%aa%e4%bf%a1%e4%b8%8e%e9%aa%84%e5%82%b2
Testing platform
var p = navigator.platform;
System.win = P.indexof ("win") = = 0;
System.mac = P.indexof ("mac") = = 0;
system.x11 = (P = = "X11″) | | (P.indexof ("Linux") = = 0);
Jump statement
http://dict.baidu.com/s?wd=%E6%B3%95%E5%9B%BD%E6%B4%9B%E4%B8%BD%E8%AF%97%E4%B8%B0%E8%83%B8+%E6%BA%90%E8%87%AA% E6%b3%95%e5%9b%bd+%e7%be%8e%e4%b8%bd%e4%b8%ad%e5%9b%bd
if (system.win| | system.mac| | SYSTEM.XLL) {//Turn to Background landing page
Window.location.href= "login.jsp";
}else{
Window.location.href= "waplojin.jsp";
}
</script>
JS to judge the browser is the phone side of the computer side