window.onload = window.onresize = function initialLoad(){updateOrientation();}
function updateOrientation(){
    var contentType = '';
    switch(window.orientation){
        case 0:
            contentType = 'normal';
            break;
        case -90:
            contentType = 'left';
            break;
        case 90:
            contentType = 'right';
            break;
        case 180:
            contentType = 'flipped';
            break;
    };
    alert(contentType);
}

  

相关文章:

  • 2021-05-06
  • 2021-11-19
  • 2022-02-09
  • 2022-12-23
  • 2022-02-09
  • 2021-10-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案