用手机看电脑网站表示很有压力,就JS来判断跳转吧!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>手机通用代码测试</title>
</head>
<body>
<script type="text/javascript">
//平台、设备和操作系统
var system ={
win : false,
mac : false,
xll : false,
ipad : false,
iphone : 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);
system.ipad = p.indexOf("iPad") == 0;
system.iphone = p.indexOf("iPhone") == 0;
if(system.win||system.mac||system.xll){
document.write("你用的是WIN OR MAC OR XLL");
}else if(system.iphone){
//window.location.href = 'http://www.coolneng.com';
document.write("用Iphone系列毫无压力");
}else{
//window.location.href = 'http://www.xinxiamedia.com';
document.write("安卓系统表示有压力");
}
</script>
</body>
</html>