M版跳转

@section HeadScript{
    <script>
    (function(ua, ls){
    ua = navigator.userAgent.toLowerCase();
    ls = location.search.toLowerCase();
    if(/mobile|tablet|ip(ad|hone|od)|android/.test(ua)){
        if(!/(\?|\&)m=f/.test(ls)){
            top.location.href = "https://m.xx.com";
        }
    }
    }());
    </script>
}

 

posted @ 2015-02-17 09:27  eaysun  阅读(144)  评论(0编辑  收藏  举报