Skip to content
Related Articles

Related Articles

HTML | Navigator appVersion Property
  • Last Updated : 26 Jul, 2019

The Navigator appVersion Property is a read-only property and it returns a string which represents the version information of the browser. It is used for returning the information related to the version of the browser.

Syntax:

navigator.appVersion

Below program illustrates the Navigator appVersion Property :
Getting the version information of the browser.




<!DOCTYPE html>
<html>
  
<head>
    <title>
      Navigator appVersion Property in HTML
    </title>
    <style>
        h1 {
            color: green;
        }
          
        h2 {
            font-family: Impact;
        }
          
        body {
            text-align: center;
        }
    </style>
</head>
  
<body>
  
    <h1>GeeksforGeeks</h1>
    <h2>Navigator appVersion Property </h2>
  
    <p>
      For returning the codename of the current browser,
      double click the "Return Browser Version" button: 
    </p>
  
    <button ondblclick="version()">
      Return Browser Version
    </button>
  
    <p id="BrowserVersion"></p>
  
    <script>
        function version() {
            var v = 
                "Browser Version : " + navigator.appVersion;
            document.getElementById("BrowserVersion").innerHTML = v;
        }
    </script>
  
</body>
  
</html>

Output:

After clicking the button

Supported Browsers: The browser supported by Navigator appVersion are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari



My Personal Notes arrow_drop_up
Recommended Articles
Page :