监听手机横屏竖屏

window.addEventListener('orientationchange', function(event){
  if ( window.orientation == 90 || window.orientation==-90 || window.orientation==0 ) {
    //
  }
})

posted @ 2015-05-21 10:18  henudxk  阅读(184)  评论(0编辑  收藏  举报