All HTML tags on the page are represented byElements . It can help you find all other elements on the page, it can create new tag-elements, it can write a complete new content.
Here are the methods and properties unique to document, that you will need most.
Document is a Node and inherits all Node's methods and attributes. They are not all meaningful.

  • Element Methodsdescription:
  • addEventListener()Adds an Event Listener
  • appendChild()adds the child-Element to the end of the elements node-list
  • insertBefore()inserts the new element before the specified element
  • removeChild()removes specified childnode from the element
  • replaceChild()replaces specified childnode by another node
  • cloneNode()Returns a clone of the node.
  • Element Propertiesfires when:
  • attributesreturns name NamedNodeMap of attributes
  • titlereturns loading status of document:uninitialized/loading/interactive/complete
  • childNodesreturns a NodeList of all children(including textnodes)
  • childrenreturns a NodeList of all the element's children
  • clientHeightreturns the viewable height of the element
  • clientWidthreturns the viewable width of the element
  • offsetHeightreturns the viewable height of the element
  • offsetWidthreturns the viewable width of the element
  • URLreturns full address to this page
  • domainreturns domain name of this page

<-----Back        Next --->

This username already exists.

This username already exists.

Login or register to save your work.

User name field is empty.

Your username needs to be at least 7 characters long.

Your username can not contain any of the following characters: ",', <, > , < and whitespaces.

Please enter a correct email addresss .

This email address is not found in our database .

Your password needs to be at least 7 characters long.

forgot password