Navigator platformProperty

Navigator 对象参考手册Navigator Object

Definition and Usage

The platform property is a read-only string that declares the operating system and/or hardware platform on which the browser runs.

Syntax

navigator.platform


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the platform property.


Examples

Example

Which platform is your browser compiled on:

<script>

document.write("Hardware platform: " + navigator.platform);

</script>

The above example outputs:


Try it Yourself »


实例

More Examples

This example contains all navigator properties.


Navigator 对象参考手册Navigator Object Other Extensions