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