if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
//alert(navigator.userAgent);
window.location.href ="iPhone.html";
} else if (/(Android)/i.test(navigator.userAgent)) {
//alert(navigator.userAgent);
window.location.href ="Android.html";
} else {
window.location.href ="pc.html";
};
if(/(iPhone|iOS|Android|Windows Phone)/i.test(navigator.userAgent)){
window.location.href = 'mobile.html';
}
转载自:http://www.fufuok.com/JS-iphone-android.html
js 判断iPhone|iPad|iPod|iOS|Android客户端
最新推荐文章于 2024-07-12 14:28:15 发布