var u = navigator.userAgent;
if ((u.indexOf('Mac') > -1 || u.indexOf('Windows') > -1) && (u.indexOf('iPhone')==-1) ){
console.log('这是PC端');
}else {
console.log('这是手机端');
}
2021-07-28 23:09:26
var u = navigator.userAgent;
if ((u.indexOf('Mac') > -1 || u.indexOf('Windows') > -1) && (u.indexOf('iPhone')==-1) ){
console.log('这是PC端');
}else {
console.log('这是手机端');
}