Document Object


Prev Tutorial Next Tutorial

Document Object

The document object represents the whole html document. When html document is loaded in the browser, it becomes a document object. It is the root element that represents the html document.

document object

Methods of document object

MethodDescription
write("string")writes the given string on the document.
writeln("string")Same as write(), but adds a newline character after each statement.
getElementById()returns the element having the given id value.
getElementsByName()returns all the elements having the given name value.
getElementsByTagName()returns all the elements having the given tag name.
getElementsByClassName()returns all the elements having the given class name.

Prev Tutorial Next Tutorial

Google Advertisements
Download Projects

Google Adsense Advertisements

Buy 3 Year Old Domain, Tutorialday.com, SeosmoTools.com @$200

Buy This Ad Space @$50 per Month, Ad Size 300X250 Contact on: hitesh.xc@gmail.com WhatsApp no. 8882538826

Yahoo Advertisements