Contents

조회 수 19430 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
<!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
번호 분류 제목 글쓴이 날짜 조회 수
565 Develop OpenGL 강좌 사이트 모음 hooni 2013.04.23 9672
564 Develop [c] 오목.. 간단한 소스 ㅋㅋ file hooni 2013.04.23 9671
563 Develop [c] 이진트리(binary tree)의 특성 file hooni 2003.04.23 9639
562 Develop [js] Closure를 이용해 캡슐화.. hooni 2013.12.16 9620
561 Develop [c++] 링크리스트(linked list) 클래스(스택,큐) file hooni 2003.04.23 9595
560 Develop [c++] 마방진 소스코드 file hooni 2013.04.23 9570
559 Develop [c] 파일(File)의 연결과 연결 해제 (link, unlink, chown) hooni 2013.04.23 9556
558 Develop [c] 팩토리얼.. - 재귀함수 hooni 2003.04.23 9529
557 Develop [java] 거스름돈 계산.. swing 사용 file hooni 2013.04.23 9464
556 Develop [java] 스윙(swing)버튼 테스트 ㅋㅋ file hooni 2013.04.23 9448
555 Develop [js] jQuery 셀랙터(selector) 요약 hooni 2013.12.17 9439
554 Develop [c] 공용체를 이용해 MSB를 LSB로 변환 file hooni 2013.04.23 9390
Board Pagination Prev 1 ... 19 20 21 22 23 24 25 26 27 28 ... 71 Next
/ 71