标签:func event 竖屏 dev 状态 ati als size on()
//判断手机横竖屏状态:
window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", function() {
if (window.orientation === 180 || window.orientation === 0) {
//竖屏
}
if (window.orientation === 90 || window.orientation === -90 ){
//横屏
}
}, false);
标签:func event 竖屏 dev 状态 ati als size on()
原文地址:http://www.cnblogs.com/wangqiao170/p/6759028.html