🏫 TECH/🖼️ Front [javascript] 웹페이지 접속 기기가 PC인지 모바일인지 판단하는 방법 728x90 🔥 Problem 👉 웹페이지 접속 기기가 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 Buy me a coffee ▶ Youtube Sub 🧭 References [1] reference : https://doctorson0309.tistory.com/ [2] Ads : https://play.google.com/store/apps/details?id=io.cordova.seoulfilter 반응형 공유하기 URL 복사카카오톡 공유페이스북 공유엑스 공유 게시글 관리 구독하기팀드모네 IT Blog 저작자표시 비영리 변경금지 '🏫 TECH > 🖼️ Front' 카테고리의 다른 글 [Solved] Failed to apply font family when saving image with html2canvas (1) 2023.10.12 F12 및 개발자 도구를 막는 방법 (0) 2023.07.30 [오류 해결 방법] Component name "header" should always be multi-word (0) 2023.01.24 VSCode에서 vue를 개발할 때, 꼭 설치해야 하는 확장 프로그램 TOP4 (2) 2023.01.24 [오류 해결 방법] vue 이 시스템에서 스크립트를 실행할 수 없으므로 vue.ps1 파일을 로드할 수 없습니다 (0) 2023.01.24 Contents 🔥Problem 🧙Solution 🧭References 당신이 좋아할만한 콘텐츠 [Solved] Failed to apply font family when saving image with html2canvas 2023.10.12 F12 및 개발자 도구를 막는 방법 2023.07.30 [오류 해결 방법] Component name "header" should always be multi-word 2023.01.24 VSCode에서 vue를 개발할 때, 꼭 설치해야 하는 확장 프로그램 TOP4 2023.01.24 댓글 0 + 이전 댓글 더보기