Javascript Browser Navigator product Property

Introduction

Get the browser's engine name:

var x = "Browser's Engine Name: " + navigator.product;

Click the button to display the engine name of the browser.

View in separate window

<!DOCTYPE html>
<html>
<body>
<button onclick="myFunction()">Test</button>
<p id="demo"></p>

<script>
function myFunction() {//w  ww. j a va  2  s.com
  var x = "Browser's Engine Name: " + navigator.product;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

The product property returns the engine name of the browser.

All browsers returns "Gecko".

This property is read-only.




PreviousNext

Related