手机端网页 横竖屏翻转事件

window.addEventListener('orientationchange', function(event){
    if( window.orientation == 90 || window.orientation == -90 ) {
        //横屏翻转处理事件
    }else{
	//竖屏处理事件
    }
});

  

原文地址:https://www.cnblogs.com/yanliangnh/p/5922675.html