본문 바로가기

JavaScript & JQuery

[JavaScript] Device 종류 확인하기

navigator.userAgent.match(/Android/);   ->   리턴값은 맞을경우 Object 타입, 아닐경우 null

navigator.userAgent.match(/iPhone/);

navigator.userAgent.match(/iPad/);

navigator.userAgent.match(/Windows/);

.

.

.