w3resource logo

JavaScript Client Objects

JavaScript Navigator Object : platform Property

Secondary Nav


The platform property of the navigator object specifies the platform on which the browser is running. Platform values are Win32, Win16, Mac68k, MacPPCa and various Unix.


Implemented in JavaScript 1.2



Example of Navigator Object : platform Property

The following web document shows the platform on which the browser is running.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>JavaScript navigator  object - platform property example</title>
<h1 style="color: red">JavaScript navigator object : platform property</h1>
<hr />
<script type="text/javascript">
//This is done to make the following JavaScript code compatible to XHTML. <![CDATA[
document.write("navigate platform property : " + navigator.platform);

View the example of navigator object's platform property in the browser

Supported Browser

Internet Explorer 7 Firefox 3.6 Google Chrome 7 Safari 5.0.1 Opera 10
Yes Yes Yes Yes Yes


See also :

JavaScript Client side objects, methods, properties.

JavaScript Core objects, methods, properties.

Join our Question Answer community to learn and share your programming knowledge.