操作系统jDwCUZPbB编程客栈
jDwCUZPbBcss
javascript
网站java脚本
http://www.cppcns.comjs
function uaredirect(f){
try{if(
document.getElementById("bdmark")!=null){
return
}
var b=false;
if(arguments[1]){
var e=window.location.host;var a=window.location.href;
if(isSubdomain(arguments[1],e)==1){
f=f+"/#m/"+a;b=true}else{if(isSubdomain(arguments[1],e)==2){f=f+"/#m/"+a;b=true}
else{f=a;b=false}}}
else{b=true}if(b){var c=window.location.hash;
if(!c.match("fromapp")){
if((navigator.userAgent.match(/(iPhone|iPod|Android|ios|Windows Phone)/编程客栈i))){location.replace(f)}}}}catch(d)<br> {<br> }<br>}
jDwCUZPbBcss
javascript
网站java脚本
http://www.cppcns.comjs
复制代码 代码如下:
function uaredirect(f){
try{if(
document.getElementById("bdmark")!=null){
return
}
var b=false;
if(arguments[1]){
var e=window.location.host;var a=window.location.href;
if(isSubdomain(arguments[1],e)==1){
f=f+"/#m/"+a;b=true}else{if(isSubdomain(arguments[1],e)==2){f=f+"/#m/"+a;b=true}
else{f=a;b=false}}}
else{b=true}if(b){var c=window.location.hash;
if(!c.match("fromapp")){
if((navigator.userAgent.match(/(iPhone|iPod|Android|ios|Windows Phone)/编程客栈i))){location.replace(f)}}}}catch(d)<br> {<br> }<br>}
本文标题: js如何判断用户是在PC端和还是移动端访问
本文地址: http://www.cppcns.com/wangluo/javascript/107762.html
© 著作权归作者所有
举报
发表评论
0/200