Fork me on GitHub

wap版和pc版的旋转js

<script type="text/javascript">
var evt = "onorientationchange" in window ? "orientationchange" : "resize";
      
window.addEventListener(evt, function() {
    alert("屏幕旋转");
}, false);
</script>

 

posted on 2014-06-06 15:18  雨为我停  阅读(183)  评论(0编辑  收藏  举报