Javascript examples for Browser Object Model:Navigator
The platform property returns for which platform the browser is compiled.
A String, representing platform of the browser.
The following code shows how to get the platform of your browser:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {// w w w .j ava 2 s . com var x = "Platform: " + navigator.platform; document.getElementById("demo").innerHTML = x; } </script> </body> </html>