DOM Object: Document

Property/Method Functional Description Data Test Case
doctype Read the DocumentType node defined for the document   cdoc001.html
doctype Read the DocumentType node defined for the document when there is no doctype set (should return null)   cdoc002.html
implementation Assess the DOMImplementation object   cdoc003.html
documentElement Access the HTML element   cdoc004.html
createElement() Create an element   cdoc005.html
createDocumentFragment() Create an empty DocumentFragment object   cdoc006.html
createTextNode() Create a Text node with a specified string.   cdoc007.html
createComment() Create a Comment node with a specified string.   cdoc008.html
createCDATASection() Create a CDATASection node whose value is a specified string.   cdoc009.html
createProcessingInstruction() Create a ProcessingInstruction node given a specified name and data strings.   cdoc010.html
createAttribute() Create an Attr of the given name.   cdoc011.html
createEntityReference() Create an EntityReference object.   cdoc012.html
getElementsByTagName() Get a NodeList of all the Elements with a given tag name.   cdoc013.html
getElementsByTagName() Get an attribute of a specified Element   cdoc014.html
getElementById(elementId)
DOM2
Parameters 
- elementId: The unique id value for an element.

Return Value :   The matching element. 

Read the element ID of a document with one element using ID.   cdoc015.html
getElementById(elementId)
DOM2
Read the element IDs of a document with many different elements containing IDs.   cdoc016.html
getElementById(elementId)
DOM2
Read the element IDs of a document with many different elements containing IDs and at least 2 having the same ID.   cdoc017.html