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

ValueCondition
0

The device is in portrait mode.

90

The device is in landscape mode, turned 90 degrees to the left.

-90

The device is in landscape mode, turned 90 degrees to the right.

0

The device is in portrait mode; however, it is inverted from its normal position.

 

See also

window

 

 

Show:
© 2015 Microsoft