首页 > 移动平台 > 详细

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

时间:2020-06-30 15:39:56      阅读:67      评论:0      收藏:0      [点我收藏+]
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";  
}; 

  

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

原文:https://www.cnblogs.com/whqbk/p/13213564.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!