orientation property
Returns a numeric value representing the orientation of the device.
This property is read-only.
Syntax
nRotation = window.orientation;
Property values
Type: String
| Value | Condition |
|---|---|
|
The device is in portrait mode. |
|
The device is in landscape mode, turned 90 degrees to the left. |
|
The device is in landscape mode, turned 90 degrees to the right. |
|
The device is in portrait mode; however, it is inverted from its normal position. |
See also
Show: