MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology

JavaScript Tutorial

Browsers In JavaScript
Previous Home Next

The browser provides us with a hierarchy of objects which we can use to control and access various information about time, screen, page, elements on a page etc.

All browsers are split into different parts i.e objects that can be accessed using Javascript. Collectively these parts are known as the Browser Object Model, or the BOM .

BOM is a pack of objects that allow to control the browser, e.g change current URL, access frames, do background requests to server with XMLHttpRequest etc. Functions like alert,confirm,prompt also belong BOM, they are provided by the browser.

The important javascript BOM are :

  • history object.
  • window object .
  • navigator object.
  • document object .
  • location object.
  • screen object.

history object :

The history object tracks what pages the user has visited in the current browser session. It is stored as a data stack that allows the user to use the Back and Forward buttons to move through the stack.

Methods of JavaScript history object :

Method Description
forward() To go one step forward in the history
back() loads the previous page.
length To return the items in the browser history
go() loads the given page number


window Object :

The window object represents the browser's frame or window, in which window is created automatically .

Methods of javascript window object :

Method Description
confirm() displays the confirm dialog box containing message with ok and cancel button
alert() displays the alert box containing message with ok button.
prompt() displays a dialog box to get input from the user.
close() its closes the current window.
open() its opens the new window.

Navigator Object:

The JavaScript window object property of navigator is used refer to the Navigator object, which contains all information related to browser, it vendor , version, plugins etc.

Methods of javascript Navigator Object :

Method Description
appName The name of the Browser.
appVersion Specifies the Version of the Browser.
appCodeName The Code name of the Browser.
platform The HTTP user-agent header sent from the browser to the server.
userAgent eturns the plugins. It is supported in Netscape and Firefox only.
cookieEnabled its returns true if cookie is enabled otherwise false
plugins its returns the plugins. It is supported in Netscape and Firefox only.
mimeTypes Array of MIME types registered with the browser.
Previous Home Next