I know that in Safari on an iPhone you can detect the screen's orientation and change of orientation by listening for the onorientationchange
event and querying window.orientation
for the angle.(我知道在iPhone上的Safari中,你可以通过监听onorientationchange
事件和查询window.orientation
来检测屏幕的方向和方向的变化。)
Is this possible in the browser on Android phones?(这可能在Android手机上的浏览器中出现吗?)
To be clear, I am asking whether the rotation of an Android device can be detected by JavaScript running on a standard web page.(为了清楚起见,我问的是,在标准网页上运行的JavaScript是否可以检测到Android设备的旋转。) It is possible on an iPhone, and I wondered whether it could be done for Android phones.(这可能在iPhone上,我想知道是否可以为Android手机完成。)
ask by philnash translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…