Views 19357 Votes 0 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
<!DOCTYPE html>  
<html>  
<head>  
<title>Orientation Checker</title>  
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximumscale=1.0; user-scalable=0;" />  
<script type="text/javascript" src="/js/jquery-1.6.1.min.js"></script>   
<script type="text/javascript">  
/*  
 * ios, android 둘다 지원되는 스크립트   
 */   
var ori_status;   
  
$(document).ready(function() {    
    window.onorientationchange = changeOrientation;  
    window.setTimeout(changeOrientation, 0);          
});  
  
// event handler  
function changeOrientation(){  
    if(ori_status == detectOrientation())return;  
    ori_status = detectOrientation();         
    alert(ori_status);    
}  
  
function detectOrientation(){  
    var orientation = window.orientation;   
    var rtn;  
  
    switch(orientation) {    
        case 90: case -90:    
            rtn = 'landscape';    
            break;    
        default:    
            rtn = 'portrait';    
    }    
    return rtn;  
}  
</script>  
</head>  
<body>  
  
</body>  
</html>  
?

List of Articles
No. Category Subject Author Date Views
933 Develop [c] OpenGL 임시로 여기 올림.. hooni 2003.04.23 10324
932 Develop [c] OpenGL 직사각형(2D) 크기 확대/축소 hooni 2003.04.23 9069
931 Develop [c] openssl 샘플코드.. 어려움 ㅠㅠ file hooni 2013.04.23 7020
930 Develop [c] pcapdump 파일 분석 하는 프로그램.. ㅋㅋ file hooni 2013.04.23 6900
929 Develop [c] pcap을 이용한 패킷 분석 ㅎㅎ hooni 2003.04.23 10210
928 Develop [c] RSA 암호화 구현(gmp 라이브러리 활용) file hooni 2016.10.03 880
927 Develop [c] scanf(), printf() 포맷의 형변환 hooni 2003.04.23 10856
926 Develop [c] selec()를 이용한 입출력 다중화 file hooni 2013.04.23 8259
925 Develop [c] SetTimer() & KillTimer() & 일회용 Timer hooni 2013.04.23 9209
924 Develop [c] UCP/TCP 채팅 소스 - 정리해야 함.. file hooni 2003.04.23 7911
923 Develop [c] Unix Domain Socket 을 이용한 IPC hooni 2013.04.23 8013
922 Develop [c] UTF-8을 EUC-KR로 변환.. (iconv) file hooni 2013.04.23 20129
921 Develop [c] vc++ 에서 clrscr(), gotoxy() 함수 사용하기.. hooni 2013.04.23 14254
920 Develop [c] 가변인자 함수(printf와 같은..) hooni 2013.04.23 7173
919 Develop [c] 가위 바위 보 서버, 클라이언트 소스코드 file hooni 2003.04.23 8171
918 Develop [c] 간단한 링크드 리스트(linked list) 자료형 예제.. hooni 2003.04.23 9839
Board Pagination Prev 1 ... 14 15 16 17 18 ... 74 Next
/ 74