What is document object?

The document object is the most important information source for most Javascript program , and information about many aspects of the HTML document are represented by the properties found here. It allows you to update a document, which is being displayed and to access the components available in the loaded document.
The document object has several properties. For example the write() method, which you have learn in the earlier section is very useful, and allows the program to generate HTML that will be inserted in the document when it is displayed. Various properties are given below:
  • forms[] :- An array of form objects, one for each
    and
    in the document. The number of forms in the document can be determine using the statement form.length.
  • images[] :- An array of image objects,one for each embedded image. The number of images can be determine using images.length statement.
  • links[] :- An array of link objects, one for each hypertext link in the document. The number of link objects can be determine using links.length statement.

No comments:

Post a Comment