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>  

?

List of Articles
No. Category Subject Author Date Views
993 System/OS 무료로 HTTPS 적용하기 (Let's Encrypt) file hooni 2017.10.28 1401
992 Develop What is difference between Get, Post, Put and Delete? hooni 2018.02.28 1402
991 Etc 아이폰의 터치스크린 정확도 file hooni 2015.04.01 1411
990 Etc IT감사 기법 시험 file hooni 2017.06.14 1416
989 System/OS [linux] wget 명령 사용 예제 hooni 2020.05.26 1434
988 System/OS [mac] Mac OS에서 재생되는 사운드를 녹음하는 방법 file hooni 2016.10.03 1442
987 System/OS OpenSSL로 ROOT CA 생성 및 SSL 인증서 발급하기 hooni 2017.10.28 1455
986 Database [mysql] MacOS에 MySQL 설치, 설정, 암호 재설정 file hooni 2017.12.15 1462
985 Develop [android] 레이아웃 사이즈 변경 (동적; programmatically) hooni 2016.11.07 1480
984 System/OS [mac] OS X 요세미티 사용자가 많이 겪는 버그와 몇몇 불편사항 file hooni 2015.01.04 1522
983 Develop [ios] Pod 특정 버전 설치하고 사용하기 hooni 2022.05.28 1524
982 Develop [ios] binary를 C코드로 변환 file hooni 2015.01.03 1527
Board Pagination Prev 1 ... 11 12 13 14 15 16 17 18 19 20 ... 98 Next
/ 98