sunlanda
8/29/2016 - 8:54 AM

判断pc和移动端

判断pc和移动端

var ua = navigator.userAgent.toLowerCase();
    if(ua.indexOf("android") > 0 || ua.indexOf("iphone") > 0){
        window.location.href = "m/index.html";
    }else if(top.location.href.indexOf("guigu")){
        window.location.href = "c/index.html";
    }