Tuesday, October 8, 2024
Google search engine
HomeLanguagesJavascriptHTML DOM Window navigator Property

HTML DOM Window navigator Property

The HTML DOM Window navigator property is used to return a Navigator object. The navigator object contains information about the browser. This Navigator object contains methods and properties of the application which is run the script.

Syntax:

var nav = window.navigator;

Return Value: A Navigator Object.

Example: This example shows how to get the Navigator Object of the document using this property.

HTML




<body style="text-align:center;">
    <h1 style="color:green;">
        neveropen
    </h1>
    <p>
        HTML | window navigator property
    </p>
  
    <button onclick="Geeks()">
        Click Here
    </button>
  
    <script>
        function Geeks() {
            console.log(window.navigator);
        }
    </script>
</body>


Output:

Supported Browsers:

  • Google Chrome
  • Edge
  • Firefox
  • Safari
  • Opera

We have a Cheat Sheet on Javascript where we covered all the important topics of Javascript to check those please go through Javascript Cheat Sheet-A Basic guide to JavaScript.

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!

Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments