Technical Training
JavaScript TutorialJavaScript HTML DOM Objects
Working with JavaScript DOM Objects
Screen:
Screen object object contains information about the display screen of the client. The object provides information about the user's video display and color settings. JavaScript runtime engine automatically creates these settings.
There are various properties associated with the Screen object.
Properties of Screen Object:
- availHeight
- availWidth
- bufferDepth
- colorDepth
- deviceXDPI
- deviceYDPI
- fontSmoothingEnabled
- height
- logicalXDPI
- logicalYDPI
- pixelDepth
- updateInterval
- width
In the next sections, the usage, syntax and explanation with examples of each of the properties of the Screen object will be discussed.
Navigator:
Navigator object is an object that is automatically created JavaScript runtime engine. Navigator contains information about the client browser.
This object is used to obtain information about the type of browser being used to access the page. Using this information, the user can be directed to a different page or carry out tasks or functions depending upon the user’s browser.
The following list gives some of the properties and methods of the Navigator object.
Properties of Navigator Object:
-
appCodeName
-
appMinorVersion
-
appName
-
appVersion
-
browserLanguage
-
cookieEnabled
-
cpuClass
-
onLine
-
platform
-
systemLanguage
-
userAgent
-
userLanguage
Methods of Navigator Object:
- javaEnabled()
- taintEnabled()
History:
Like the Screen Object, the History object is also automatically created object by the JavaScript runtime engine. Browsers store the list of the user’s previously visited URLs. Using this list, the user navigates to previously visited web pages using the back and forward buttons in the browser. This list of URLs is called the browser's history. It's stored in the form of a list that can be accessed by JavaScript. History object can be assessed by using the window.history property. The History object is a part of a Window object.
The following list gives some of the properties and methods of the History object.
Property of History Object:
- length
Methods of History Object:
- back()
- forward()
- go()
Syntax and explanation with examples of History object properties and methods are discussed in coming sections.
Location:
Location object contains information about the current URL and thus this object provides access and control over the URL of the current window. But one important point to note in this context is that it cannot modify the URL displayed in the browser's address box and thus adds security in its usage. Since it is part of the Window object it is accessed using the window.location property.
Location Object is automatically created by the JavaScript runtime engine. The following list gives some of the properties and methods of the Location object.
Properties of Location Object:
- hash
- host
- hostname
- href
- pathname
- port
- protocol
- search
Methods of Location Object:
- assign()
- reload()
- replace()
JavaScript Tutorial
- JavaScript Browser Objects Part 2
- JavaScript Frame object
- JavaScript Form Object
- JavaScript FileUpload Object
- JavaScript Event Object Properties and Methods
- JavaScript Event Object
- JavaScript Elements and Embed Objects
- JavaScript Applet Objects
- JavaScript Browser Objects
- JavaScript Object Oriented Features
- JavaScript Window Object Open Method Part 2
- JavaScript Window Object Open Method
- JavaScript Window Object Timeout Methods
- JavaScript Location Object
- JavaScript Location Object Properties
- JavaScript History Object Properties and Methods
- JavaScript Document Object Methods Part II
- JavaScript Document Object Methods Part I
- JavaScript Document Object Properties
- JavaScript Document Object
- JavaScript Windows Object Properties Part II
- JavaScript Windows Object Properties Part I
- JavaScript DOM Window Object
- Working with JavaScript DOM Objects
- JavaScript Array Object Methods – Part II
- JavaScript Array Object
- JavaScript Array Object Methods – Part I
- JavaScript Boolean Object
- JavaScript OnError Event
- JavaScript Exception Handling – Part II
- JavaScript Exception Handling – Part I
- JavaScript Event Handler
- JavaScript Events Handling
- JavaScript Array Operations
- JavaScript Two Dimensional Arrays
- Passing values to JavaScript Function
- JavaScript Functions
- JavaScript Arrays
- JavaScript Iterative Structures - Part II
- JavaScript Iterative Structures - Part I
- JavaScript Math Object
- JavaScript Date Object
- JavaScript String Object
- JavaScript Objects
- JavaScript Confirm Box
- JavaScript Alert Box
- JavaScript Conditional Statements Part 2
- JavaScript Conditional Statements Part 1
- How to use JavaScript in HTML page
- JavaScript Variables
- JavaScript Features
- JavaScript Introduction







