Contents

Views 19357 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 기본 설치

  2. [node.js] 지금 하고 있는거..

  3. [iphone] 파일 업로드 샘플 코드 ㅎㅎ

  4. [js] JSON 컨트롤.. 재귀호출로 값 출력하기

  5. [js] 모바일웹에서 이미지 저장하는거 (context menu) 막기

  6. [android] keytool을 사용하여 키스토어 생성

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

  8. 맥에서 파일공유 (윈도우,맥)

  9. [mysql] mysql user 생성시 ERROR 1364

  10. Mac OS X - Apache+PHP+MySQL 환경 서버

  11. 영어공부에 도움될만한 사이트 모음

  12. 서기의 PHP 동영상 강의(싱싱해)

Board Pagination Prev 1 ... 57 58 59 60 61 62 63 64 65 66 ... 98 Next
/ 98