威尼斯赌博游戏

自动识别PC手机并跳转地址

来源: www.luyouqiwo.com| 2017-02-18 00:59
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<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
};
//检测平台
var p = navigator.platform;
system.win = p.indexOf("Win") == 0;
system.mac = p.indexOf("Mac") == 0;
system.x11 = (p == "X11") || (p.indexOf("Linux") == 0);
//跳转语句,如果是手机访问就自动跳转到wap.baidu.com页面
if(system.win||system.mac||system.xll){
window.location.href="https://www.baidu.com";
}else{
window.location.href="wap.baidu.com";
}
</script>
</body>
</html>

猜你喜欢
推荐
随机推荐
相关文档
Top
Baidu