Java Reference
In-Depth Information
HTML Document Objects: The HTML Document
The HTMLDocument object is the root of HTML documents and contains the entire content.
Properties
Property Name
Description
Introduced
anchors
Returns an HTMLCollection of all <a/> elements in the docu-
ment that have a value assigned to their name attribute.
Level 1
applets
Returns an HTMLCollection of all <applet/> elements and
<object/> elements that include applets in the document.
Level 1
body
Returns the element that contains the document's content.
Returns the <body/> element, or the outermost <frameset/>
element depending on the document.
Level 1
cookie
Returns the cookies associated with the document. Returns an
empty string if none.
Level 1
domain
Returns the domain name of the server that served the docu-
ment. Returns null if the domain name cannot be identifi ed.
Level 1
forms
Returns an HTMLCollection of all <form/> elements in the
document.
Level 1
images
Returns an HTMLCollection object containing all <img/>
elements in the document.
Level 1
links
Returns an HTMLCollection of all <area/> and <a/>
elements (with an href value) in the document.
Level 1
referrer
Returns the URL of the page that linked to the page. Returns
an empty string if the user navigated directly to the page.
Level 1
title
The title of the document as specifi ed by the <title/>
element in the document's <head/> element.
Level 1
URL
The complete URL of the document.
Level 1
Methods
Method Name
Description
Introduced
close()
Closes a document and opened with open()
forces page rendering.
Level 1
getElementById(elementId)
Returns the element with the given elementId or
null if no element could be found. Removed in
DOM Level 2 and added to the Document object .
Level 1
Search WWH ::




Custom Search