JavaScript 활용팁
2017.05.15 / 22:13

[JavaScript] Device 종류 확인하기

MultiPlayer
추천 수 107

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

navigator.userAgent.match(/iPhone/);

navigator.userAgent.match(/iPad/);

navigator.userAgent.match(/Windows/);