조회 수 20855 추천 수 0 댓글 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>  
?

  1. [opengl] 컴퓨터 그래픽스 강의 자료(수업자료)

  2. [php] substr() 한글 자를 때 깨짐 방지

  3. [python] 애니팡, 캔디팡 매크로

  4. [ios] libxml/tree.h file not found

  5. [c] UTF-8을 EUC-KR로 변환.. (iconv)

  6. [php] XE 에서 php 구문 사용하기 (XE 템플릿에서)

  7. [js]모바일 웹에서 orientationchange

  8. [c] AES 알고리즘 (암호화/복호화)

  9. [ios] iphone SetDeviceOrientation 화면 강제 회전

  10. [js] 파이어폭스(Firefox;F/F)에서 outerHTML 작동하도록 만든 메소드

  11. [ios] Objective-C에서 형식이 있는 문자열(Format Strings)에 사용할 수 있는 토큰들(Tokens)

  12. [java] 입출력 스트림 3부 (오브젝트)

  13. URI 인코딩, URL 인코딩

  14. 모터에 대한 pid 제어.. ㅎㅎ

  15. [ios] 앱에서 다른 앱 실행시키기

  16. [ios] NSString 간단한 정규식 사용법

Board Pagination Prev 1 ... 6 7 8 9 10 ... 53 Next
/ 53