Document Object

Advertisements

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 Advertisment

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements