What are windows object and navigator object in JavaScript?
Windows object is top level object in Java script. It contains several other objects such as, document, history, location, name, menu bar etc., in itself. Window object is the global object for Java script that is written at client-side.
Information pertaining to the client browser and system is returned by the navigator object of JavaScript. Navigator object is the top level object for all users.
What are windows object and navigator object in JavaScript?
The details of the client browser can be obtained sing JavaScript. Details such as client name, version, codename and the platform can be obtained.
- navigator.appName - Gives the name of the browser
- navigator.appVersion - Gives the browser version
- navigator.appCodeName - Gives the browser codename
- navigator.platform - Gives the platform on which the browser is running
The JavaScript Window Object is the top level JavaScript object which corresponds to the web browser window.
Opening Browser Windows using JavaScript newWindowObj = window.open("URL", "WindowName", "feature, feature, feature ... ");
- features - A comma separated list of features that allow you to customize the appearance of the window.