js 判断当前的手机系统类型
2014-12-20 13:12
405 查看
<script language="javascript">
window.onload = function () {
alert("1");
var u = navigator.userAgent;
if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) {//安卓手机
alert("安卓手机");
// window.location.href = "mobile/index.html";
} else if (u.indexOf('iPhone') > -1) {//苹果手机
// window.location.href = "mobile/index.html";
alert("苹果手机");
} else if (u.indexOf('Windows Phone') > -1) {//winphone手机
alert("winphone手机");
// window.location.href = "mobile/index.html";
}
}
</script>
window.onload = function () {
alert("1");
var u = navigator.userAgent;
if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) {//安卓手机
alert("安卓手机");
// window.location.href = "mobile/index.html";
} else if (u.indexOf('iPhone') > -1) {//苹果手机
// window.location.href = "mobile/index.html";
alert("苹果手机");
} else if (u.indexOf('Windows Phone') > -1) {//winphone手机
alert("winphone手机");
// window.location.href = "mobile/index.html";
}
}
</script>
相关文章推荐
- js 判断当前的手机系统类型
- js 判断当前的手机系统类型
- JS判断手机当前的系统类型
- js 判断当前的手机系统类型
- js 判断当前的手机系统类型
- js 判断当前的手机系统类型
- js 判断当前手机系统类型
- js 判断当前的手机系统类型
- js 判断当前的手机系统类型
- JS 判断 取 当前系统类型 可用来定义某些WIN7系统和XP系统下字体区别
- JS判断当前手机类型
- js 判断当前浏览器类型
- 判断当前手机系统是否支持google map api
- JS 判断浏览器类型,包括手机类型。
- js判断当前浏览器类型,判断IE浏览器方法
- iphone最牛判断当前手机网络连接类型wifi-2G-3G-4G-5G
- js判断当前浏览器类型,判断IE浏览器方法
- js判断浏览器类型(手机和电脑终端)
- js 判断不同系统的浏览器类型
- 判断来访问网站的用户是手机用户还是Web浏览器的用户【即判定用户当前使用的系统】