h5监听横竖屏旋转:
function orientate() {
if (global.orientation === 90 || global.orientation === -90) {
alert('cross')
} else {
alert('vertical')
}
}
global.addEventListener('onorientationchange' in global ? 'orientationchange' : 'resize', orientate, false)