摘要: 在移动应用中,有时要判断用户把设备竖向变成横向时,页面必须做出必须的调整,在 apple系列的机器上,如ipad,iphone,itouch等,有一个属性可以判断: window.onorientationchange = detectOrientation;function detectOrientation(){if(typeof window.onorientationchange != 'undefined'){if ( orientation == 0 ) {//Do Something In Portrait Mode}else if ( orientation = 阅读全文
posted @ 2011-11-26 11:12 红叶舞秋山 阅读(238) 评论(0) 推荐(0) 编辑