$(window).bind('orientationchange',_orientationHandler);
那么在_orientationHandler函数中,有如下的东西:
if(event.orientation){ if(event.orientation == 'portrait'){ //do something } else if(event.orientation == 'landscape') { //do something } }