1
私は私のモトローラドロイド私は、次のJavaScriptコードを持っている1.上のWebkitで画面の回転を検出しようとしています:アンドロイドは検出回転&スクリーン幅
var supportsOrientationChange = "onorientationchange" in window,
orientationEvent = supportsOrientationChange ? "orientationchange" : "resize";
window.addEventListener(orientationEvent, function() {
alert("screen.width: " + screen.width + ", window.orientation: " + window.orientation);
}, false);
問題がある:それは569 screen.width警告電話機は縦向きに回転し、横向きに回転させると320回転します。これは私には意味がありません!誰かが明確にすることができますか?
は、私は、あなたは、Android 2.2を実行している賭け、 イゴール