말러83

USER_AGENT 분석 함수 있으신 분?

혹시 그누보드의 get_brow()나 get_os()와 같은 함수를 공개해놓은 것을 보셨나요?
스마트폰을 종류별로 구분해놓은 것을 예전에 팁게시판에서 본 것 같기도 한데..
|

댓글 6개

감사합니다.^^
<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>
이렇게 쓸수 있지요.
말러님 CI 공부는 잘되어 가시나요?
다음 주부터 프로젝트 진행입니다.
http://net.tutsplus.com/ 여기에 있는 비디오 강좌가 참 좋네요.
몇번 따라하면 도움이 많이 됩니다.^^
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

+
제목 글쓴이 날짜 조회
15년 전 조회 1,851
15년 전 조회 2,011
15년 전 조회 1,802
15년 전 조회 1,697
15년 전 조회 1,815
15년 전 조회 4,066
15년 전 조회 1,754
15년 전 조회 2,140
15년 전 조회 2,180
15년 전 조회 2,174
15년 전 조회 1,767
15년 전 조회 5,413
15년 전 조회 2,080
15년 전 조회 4,293
15년 전 조회 2,643
15년 전 조회 1,812
15년 전 조회 1,796
15년 전 조회 1,987
15년 전 조회 2,128
15년 전 조회 3,921
15년 전 조회 1,831
15년 전 조회 2,006
15년 전 조회 1,767
15년 전 조회 1,983
15년 전 조회 1,759
15년 전 조회 1,825
15년 전 조회 2,371
15년 전 조회 1,814
15년 전 조회 1,816
15년 전 조회 2,346