if(window.orientation!=0){
        var obj=document.getElementById('orientation');
        alert('横屏内容太少啦,请使用竖屏观看!');
        obj.style.display='block';
}

window.onorientationchange=function(){ 
var obj=document.getElementById('orientation');

if(window.orientation==0){
                obj.style.display='none';
        }else
        {
                alert('横屏内容太少啦,请使用竖屏观看!');
                obj.style.display='block';
        }
}; 

相关文章:

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