Contents

조회 수 19357 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
753 Develop [js] 여러가지 트리(tree) 모음.. ㅋㅋ file hooni 2013.04.23 7120
752 Develop [c] 바로 보고 정리할 것.. ㅋㄷㅋㄷ file hooni 2013.04.23 7127
751 Develop [c] 달팽이 배열? 인지 먼지.. ㅋㅋ hooni 2013.04.23 7128
750 Develop [asp] 폼메일 예제와 메일 포워딩 프로그램 file hooni 2013.04.23 7129
749 Develop [web] URL 인코딩 방법.. 테이블.. ㅋㅋ hooni 2013.04.23 7142
748 Develop [java] 컴포넌트 배치 ㅡ.,ㅡ; hooni 2003.04.23 7143
747 Develop [c] 확인해 볼거.. ㅡ,.ㅡ; file hooni 2013.04.23 7145
746 Develop [c++] template 사용예 hooni 2003.04.23 7147
745 Develop [c] 파일(int fd)에서 개행문자 단위로 읽기 by 후리자 hooni 2013.04.23 7152
744 Develop [php] 탐색기와 같은 다이나믹 트리(xml/xsl 이용) file hooni 2013.04.23 7153
743 Develop [js] 후리자(영규) 스타일들.. file hooni 2013.04.23 7154
742 Develop [c++] 트리컨트롤 예제1 ㅋㅋ file hooni 2013.04.23 7167
Board Pagination Prev 1 ... 31 32 33 34 35 36 37 38 39 40 ... 98 Next
/ 98