<meta http-equiv="mobile-agent" content="format=html5; url=http://m.youkud.com/content.php?id=454"> <meta http-equiv="mobile-agent" content="format=xhtml; url=http://m.youkud.com/content.php?id=454"> <script type="text/javascript"> if((navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i))) { location.replace("http://m.youkud.com/content.php?id=454"); } </script> //上述代码写在<head>中,这样若检测到是移动端在访问此文章,自动跳转到手机版页面。