标签:
//判断是否移动端
function isPhone() {
var ua = navigator.userAgent.toLowerCase(),
Agents = ["android", "iphone", "symbianos", "windows phone", "ipad", "ipod"],
flag = false;
for (var v = 0; v < Agents.length; v++) {
if (ua.indexOf(Agents[v]) > 0) {
flag = true;
break;
}
}
return flag;
}
标签:
原文地址:http://www.cnblogs.com/duhuiling/p/4377490.html