js二级域名跳转到对应的手机站,这个js代码怎么写。51模板集给您提供代码
//手机跳转 hrefs = window.location.href; var system ={ win : false, mac : false, xll : false }; //检测平台 var p = navigator.platform; system.win = p.indexOf("Win") == 0; system.mac = p.indexOf("Mac") == 0; system.x11 = (p == "X11") || (p.indexOf("Linux") == 0); if(!(system.win||system.mac||system.xll)){ var mobilestr=hrefs.replace(/hqnk./, ""); var mobilestr=mobilestr.replace(/wxrb.com/, "3g.hfydyy.com"); window.location.href=mobilestr; }
关于本站 | 网站地图 | 手机版 | XML地图 | 反馈 | 版权申明 皖ICP备13006370号-1