首页 > 代码库 > wap版和pc版的旋转js

wap版和pc版的旋转js

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