Contents

Views 19360 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>  

?

  1. [node.js] nodejs 기본 설치

    Date2013.04.23 CategoryDevelop Byhooni Views26255
    Read More
  2. [node.js] 지금 하고 있는거..

    Date2013.04.23 CategoryDevelop Byhooni Views26979
    Read More
  3. [iphone] 파일 업로드 샘플 코드 ㅎㅎ

    Date2013.04.23 CategoryDevelop Byhooni Views11120
    Read More
  4. [js] JSON 컨트롤.. 재귀호출로 값 출력하기

    Date2013.04.23 CategoryDevelop Byhooni Views28640
    Read More
  5. [js] 모바일웹에서 이미지 저장하는거 (context menu) 막기

    Date2013.04.23 CategoryDevelop Byhooni Views26367
    Read More
  6. [android] keytool을 사용하여 키스토어 생성

    Date2013.04.23 CategoryDevelop Byhooni Views69515
    Read More
  7. [js]모바일 웹에서 orientationchange

    Date2013.04.23 CategoryDevelop Byhooni Views19360
    Read More
  8. 맥에서 파일공유 (윈도우,맥)

    Date2013.04.25 CategorySystem/OS Byhooni Views37305
    Read More
  9. [mysql] mysql user 생성시 ERROR 1364

    Date2013.04.25 CategorySystem/OS Byhooni Views28507
    Read More
  10. Mac OS X - Apache+PHP+MySQL 환경 서버

    Date2013.04.25 CategorySystem/OS Byhooni Views31629
    Read More
  11. 영어공부에 도움될만한 사이트 모음

    Date2013.05.14 CategoryEtc Byhooni Views22632
    Read More
  12. 서기의 PHP 동영상 강의(싱싱해)

    Date2013.05.15 CategoryDevelop Byhooni Views30982
    Read More
Board Pagination Prev 1 ... 57 58 59 60 61 62 63 64 65 66 ... 98 Next
/ 98