判断用户登录手机端或pc端显示不同页面

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script type="text/javascript">
    if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i))) {    //跳到手机端
        window.location = "手机页面.html";

    } else {
        //跳到电脑端
        window.location = "电脑页面.html";
    }
    </script>
</head>
<body>
    
</body>
</html>

原文地址:https://www.cnblogs.com/lichaoloveliangying/p/6723837.html