js实现判断访问设备是电脑还是手机?
2023-06-03开发笔记祥哥203°c
A+ A-function IsPhone(){
var info = navigator.userAgent;
var isPhone = /mobile/i.test(info);
return isPhone;
}
未定义标签
function IsPhone(){
var info = navigator.userAgent;
var isPhone = /mobile/i.test(info);
return isPhone;
}