html网页判断手机还是电脑登陆进入

<script type="text/javascript">
try{
    if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
        window.location.href="mindex.html";
    }else{
        window.location.href="cindex.html";
    }
}catch(e){}
</script>

但是这样有另一个问题 搜索蜘蛛完全读不到你的网站···

posted @ 2015-05-19 13:20  秋月的私语  阅读(2296)  评论(0编辑  收藏  举报