var ua = navigator.userAgent.toLowerCase();
if (/iphone|ipad|ipod/.test(ua)) {
alert("iphone");
} else if (/android/.test(ua)) {
alert("android");
}
转载于:https://www.cnblogs.com/hellowoeld/p/6899438.html
var ua = navigator.userAgent.toLowerCase();
if (/iphone|ipad|ipod/.test(ua)) {
alert("iphone");
} else if (/android/.test(ua)) {
alert("android");
}
转载于:https://www.cnblogs.com/hellowoeld/p/6899438.html