Navigator platform Property
Example
Get the version of your browser:
var x = "Platform: " + navigator.platform;
Try it Yourself »
More "Try it Yourself" examples below.
Definition and Usage
The platform property returns for which platform the browser is compiled.
Browser Support
Property | |||||
---|---|---|---|---|---|
platform | Yes | Yes | Yes | Yes | Yes |
Syntax
navigator.platform
Technical Details
Return Value: | A String, representing platform of the browser. Possible values:
|
---|
More Examples
Example
A demonstration of all navigator properties in one example:
var txt = "";
txt += "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
txt += "<p>Browser Name: " + navigator.appName + "</p>";
txt += "<p>Browser Version: " + navigator.appVersion + "</p>";
txt += "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
txt += "<p>Browser Language: " + navigator.language + "</p>";
txt += "<p>Browser Online: " + navigator.onLine + "</p>";
txt += "<p>Platform: " + navigator.platform + "</p>";
txt += "<p>User-agent header: " + navigator.userAgent + "</p>";
Try it Yourself »
❮ Navigator Object