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/ 여기에 있는 비디오 강좌가 참 좋네요.
몇번 따라하면 도움이 많이 됩니다.^^
게시글 목록
| 번호 | 제목 |
|---|---|
| 1717291 | |
| 1717283 | |
| 1717280 | |
| 1717268 | |
| 1717265 | |
| 1717252 | |
| 1717247 | |
| 1717243 | |
| 1717237 | |
| 1717225 | |
| 1717214 | |
| 1717208 | |
| 1717203 | |
| 1717189 | |
| 1717183 | |
| 1717177 | |
| 1717172 | |
| 1717163 | |
| 1717162 | |
| 1717156 | |
| 1717154 | |
| 1717153 | |
| 1717141 | |
| 1717140 | |
| 1717138 | |
| 1717113 | |
| 1717111 | |
| 1717105 | |
| 1717099 | |
| 1717085 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기