👉 웹페이지 접속 기기가 PC인지 모바일인지 판단하는 방법?
🧙 Solution
👉 Please refer to the code below
function fn_test() {
// 웹인지 모바일인지 체크
var filter = "win16|win32|win64|macintel|mac";
if(navigator.platform) {
if(filter.indexOf(navigator.platform.toLowerCase()) < 0) {
// mobile
alert('핸드폰에서 접속!');
} else {
// PC
alert('PC에서 접속!');
}
}
}
If I was of any help to you, please buy me coffee 😿😢😥
If you have any questions, please leave them in the comments
[2] Ads : https://play.google.com/store/apps/details?id=io.cordova.seoulfilter