You are here: Reference > JavaScript > client-side > browser > properties > platform (clientInformation, navigator)
platform property (clientInformation, navigator)
Returns the name of the operating system platform.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read-only.
Possible values:
String that retrieves the type of system platform.
One of the following values:
Unix system. | |||||||
Macintosh 68K system. | |||||||
Macintosh PowerPC system. | |||||||
Solaris system. | |||||||
Windows 16-bit system. | |||||||
Windows 32-bit system. | |||||||
Windows CE system. |
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the platform property:
|
||||
<head> <script type="text/javascript"> function GetCpuOs () { if (navigator.cpuClass) { alert ("CPU class: " + navigator.cpuClass); } else if (navigator.oscpu) { alert ("CPU class: " + navigator.oscpu); } alert ("System platform: " + navigator.platform); } </script> </head> <body> <button onclick="GetCpuOs ();">Get the CPU and OS!</button> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
Related pages:
External links:
User Contributed Comments