USER_AGENT 분석 함수 있으신 분?
혹시 그누보드의 get_brow()나 get_os()와 같은 함수를 공개해놓은 것을 보셨나요?
스마트폰을 종류별로 구분해놓은 것을 예전에 팁게시판에서 본 것 같기도 한데..
댓글 6개
15년 전
http://www.sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=23688&sca=&sfl=wr_subject&stx=os&sop=and
15년 전
http://www.sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=19295&sca=&sfl=wr_subject%7C%7Cwr_content&stx=get_brow&sop=and
terrorboys
15년 전
<script type="text/javascript">
document.write(navigator.userAgent) // os 출력
</script>
이렇게 해도 됩니다.
응용하면
<script type="text/javascript">
//script by kunmin, 2010-04-06
// 20100820 테러보이 수정
var mobilewords = new Array("Windows CE","Mobile","iPhone","Android","iPad","iPod","PSP");
for (var word in mobilewords) {
if (navigator.userAgent.match(mobilewords[word]) != null) {
document.write("당신은")
document.write(navigator.userAgent.match(mobilewords[word]))
document.write("로 접속하셨습니다.<br>")
break;
}
}
</script>
이렇게 쓸수 있지요.
document.write(navigator.userAgent) // os 출력
</script>
이렇게 해도 됩니다.
응용하면
<script type="text/javascript">
//script by kunmin, 2010-04-06
// 20100820 테러보이 수정
var mobilewords = new Array("Windows CE","Mobile","iPhone","Android","iPad","iPod","PSP");
for (var word in mobilewords) {
if (navigator.userAgent.match(mobilewords[word]) != null) {
document.write("당신은")
document.write(navigator.userAgent.match(mobilewords[word]))
document.write("로 접속하셨습니다.<br>")
break;
}
}
</script>
이렇게 쓸수 있지요.
15년 전
다음 주부터 프로젝트 진행입니다.
http://net.tutsplus.com/ 여기에 있는 비디오 강좌가 참 좋네요.
몇번 따라하면 도움이 많이 됩니다.^^
http://net.tutsplus.com/ 여기에 있는 비디오 강좌가 참 좋네요.
몇번 따라하면 도움이 많이 됩니다.^^
게시글 목록
| 번호 | 제목 |
|---|---|
| 1717076 | |
| 1717072 | |
| 1717065 | |
| 1717062 | |
| 1717050 | |
| 1717042 | |
| 1717041 | |
| 1717036 | |
| 1717025 | |
| 1717024 | |
| 1717016 | |
| 1717014 | |
| 1717006 | |
| 1717004 | |
| 1716995 | |
| 1716986 | |
| 1716982 | |
| 1716978 | |
| 1716974 | |
| 1716968 | |
| 1716966 | |
| 1716952 | |
| 1716945 | |
| 1716934 | |
| 1716926 | |
| 1716920 | |
| 1716915 | |
| 1716914 | |
| 1716912 | |
| 1716906 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기