Navigator appCodeName Property - Javascript Browser Object Model

Javascript examples for Browser Object Model:Navigator

Description

The appCodeName property returns the code name of the browser as "Mozilla" for browsers.

This property is read-only.

Return Value

A String, representing the code name of the browser

The following code shows how to get the code name of your browser:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<button onclick="myFunction()">Test</button>

<p id="demo"></p>

<script>
function myFunction() {/*from www. j  a va 2 s  .co m*/
    var x = "Browser CodeName: " + navigator.appCodeName;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials