判断手机是竖屏还是横屏状态

<script>    // 判断横屏展示时的状态    window.onorientatiοnchange=function(){        if(window.orientation==90||window.orientation==-90){            window.location.reload();...
<script>
    // 判断横屏展示时的状态
    window.onorientatiοnchange=function(){
        if(window.orientation==90||window.orientation==-90){
            window.location.reload();  /*横屏状态刷新*/
        }else{
            window.location.reload();  /*竖屏状态刷新*/
        }
    }    
</script>

你可能感兴趣的文章

相关问题

0 条评论

请先 登录 后评论
admin
admin

651 篇文章

作家榜 »

  1. admin 651 文章
  2. 粪斗 185 文章
  3. 王凯 92 文章
  4. 廖雪 78 文章
  5. 牟雪峰 12 文章
  6. 李沁雪 9 文章
  7. 全易 2 文章
  8. Stevengring 0 文章