Navigator appName Property - Javascript Browser Object Model

Javascript examples for Browser Object Model:Navigator

Description

The appName property returns the name of the browser.

This property is read-only.

Return Value

The following code shows how to get the 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() {/*ww w. j  a va  2s  .  c  o  m*/
    var x = "Browser Name: " + navigator.appName;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials