// 判断苹果、安卓、pc
if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { //判断iPhone|iPad|iPod|iOS
window.location.href ="iPhone.html";
} else if (/(Android)/i.test(navigator.userAgent)) { //判断Android
window.location.href ="Android.html";
} else { //pc
window.location.href ="pc.html";
};
摘自:https://blog.csdn.net/qq_40542728/article/details/92652132
网友评论