标签:cat oca pve href 终端 use navigator linu navig
代码:
function xaizai() {
var u = navigator.userAgent, app = navigator.appVersion;
var isAndroid = u.indexOf(‘Android‘) > -1 || u.indexOf(‘Linux‘) > -1; //android终端或者uc浏览器
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
if(isiOS){
//这里写如果是ios客户需要做的事情
window.location.href="http://m.v5music.com/specialtopic/50002010/index.html";
}else if(isAndroid){
//这里写如果是安卓客户端需要做的事情
window.location.href="http://m.v5music.com/specialtopic/50002009/index.html";
}
}
标签:cat oca pve href 终端 use navigator linu navig
原文地址:http://www.cnblogs.com/lijuntao/p/7644638.html