Browser Objects
DOM Windows and Related Objects – Part 13
Forward: In this part of the series, we look at Browser Objects.
By: Chrysanthus Date Published: 31 Jul 2012
Introduction
Note: If you cannot see the code or if you think anything is missing (broken link, image absent, etc.), just contact me at forchatrans@yahoo.com. That is, contact me for the slightest problem you have about what you are reading.
What is Browser Objects?
Browser objects are the Window, Navigator, Screen, History and Location objects. We have seen these objects before. In this part of the series, we see how the Navigator, Screen, History and Location objects are used with the window objects.
The Navigator Object
The navigation object contains information about the browser, like browser name and browser version. The syntaxes to use the navigation object with the window object are:
window.navigation.property
window.navigation.method()
where the property and method are those of the navigation object.
The Screen Object
The screen object is an object, which represents the rectangle that has everything visible on the computer screen. The syntaxes to use the screen object with the window object are:
window.screen.property
window.screen.method()
where the property and method are those of the screen object.
The History Object
The history object is an object that contains a list of the URL’s visited by one user of the browser in a particular machine. The syntaxes to use the screen object with the window object are:
window.history.property
window.history.method()
where the property and method are those of the history object.
The DOM Location Object is an object from which you can get information about the URL of the document currently displayed. The syntaxes to use the location object with the window object are:
window.location.property
window.location.method()
where the property and method are those of the location object.
Note: in code, you can omit the preceding reserved word, window, and the dot, before the browser object name.
End of Series
This is the end of the series. I hope you appreciated it.
Chrys
Related Links
Major in Website DesignWeb Development Course
HTML Course
CSS Course
ECMAScript Course