개발/JavaScript
JavaScript - Detect SmartPhone Platform
dnsdud
2011. 12. 21. 18:01
<script type=”text/javascript”>
if(navigator.userAgent.match(/Android/i)) {}
else if(navigator.userAgent.match(/iPad/i)) {}
else if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {}
else {}
</script>
http://davidwalsh.name/detect-android
http://davidwalsh.name/detect-iphone