js 判断iPhone|iPad|iPod|iOS|Android客户端

来源:互联网 发布:自适应滤波算法 编辑:程序博客网 时间:2024/05/22 00:28
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";};
转载自:http://www.fufuok.com/JS-iphone-android.html
阅读全文
0 0