javascript 判断浏览器客户端

    <script type="text/javascript">
        $(document).ready(function () {
            var usAgent = navigator.userAgent.toLowerCase();

            if (usAgent.indexOf("android") >= 0 || usAgent.indexOf("iphone") >= 0 || usAgent.indexOf("ipod") >= 0 || usAgent.indexOf("ipad") >= 0) {
                location.href = "MobileWeb/sqb_mweb_login.aspx";
            }
            else {
                location.href = "BackWeb/sqb_bweb_login.aspx";
            }
        });  
    </script>

 

posted @ 2012-08-21 14:07  摩根船长  阅读(281)  评论(0编辑  收藏  举报