조회 수 19429 추천 수 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. [web] 제로보드 XE 템플릿에서 if문에 대해서 알아봅시다

    Date2013.08.16 CategoryEtc Byhooni Views19917
    Read More
  2. 양성/음성 오류에 대한 개념

    Date2013.04.23 CategoryEtc Byhooni Views19910
    Read More
  3. [세미나] XML 레포트..

    Date2003.04.23 CategoryEtc Byhooni Views19770
    Read More
  4. [php] XE 에서 php 구문 사용하기 (XE 템플릿에서)

    Date2013.10.31 CategoryDevelop Byhooni Views19533
    Read More
  5. [js]모바일 웹에서 orientationchange

    Date2013.04.23 CategoryDevelop Byhooni Views19429
    Read More
  6. 정보시스템(정보보안)의 위험관리 설명

    Date2013.04.23 CategoryEtc Byhooni Views19396
    Read More
  7. [mysql] MySQL server has gone away 에러 대응

    Date2013.05.29 CategorySystem/OS Byhooni Views19377
    Read More
  8. 나중에 해봐야지.. libconv 설치.. ㅡ,.ㅡ;

    Date2013.04.23 CategorySystem/OS Byhooni Views19336
    Read More
  9. 모터에 대한 pid 제어.. ㅎㅎ

    Date2013.04.23 CategoryDevelop Byhooni Views18936
    Read More
  10. [linux] APM(apache, php, mysql) + gd 설치순서..

    Date2003.04.23 CategorySystem/OS Byhooni Views18936
    Read More
  11. URI 인코딩, URL 인코딩

    Date2013.04.23 CategoryDevelop Byhooni Views18901
    Read More
  12. [mac] 컨텍스트(Context) 메뉴 "다음으로 열기" 내용 정리

    Date2013.07.10 CategorySystem/OS Byhooni Views18894
    Read More
  13. [linux] 패킷의 소스 주소 바꾸기

    Date2003.04.23 CategorySystem/OS Byhooni Views18856
    Read More
  14. [ios] Objective-C에서 형식이 있는 문자열(Format Strings)에 사용할 수 있는 토큰들(Tokens)

    Date2013.04.23 CategoryDevelop Byhooni Views18830
    Read More
  15. [ios] libxml/tree.h file not found

    Date2013.08.08 CategoryDevelop Byhooni Views18767
    Read More
  16. [mysql] 접속과 테이블 생성 간단한 설명..

    Date2003.04.23 CategoryDatabase Byhooni Views18738
    Read More
Board Pagination Prev 1 ... 10 11 12 13 14 ... 74 Next
/ 74