Name
HTMLDocument — the root of an HTML document tree
Availability
DOM Level 1 HTML
Inherits from/Overrides
Node → Document → HTMLDocument
Properties
-
readonlyHTMLCollectionanchors An array (HTMLCollection) of all anchors in the document. For compatibility with The Level 0 DOM, this array contains only
<a>elements that have anameattribute specified; it does not include anchors created with anidattribute.-
readonlyHTMLCollectionapplets An array (HTMLCollection) of all applets in a document. These include applets defined with an
<object>tag and all<applet>tags.-
HTMLElementbody A convenience property that refers to the HTMLBodyElement that represents the
<body>tag of this document. For documents that define framesets, this property refers to the outermost<frameset>tag.-
String cookie Allows cookies to be queried and set for this document. See Document.cookie in the client-side reference section.
-
readonly String domain The domain name of the server from which the document was loaded, or
nullif there is none. Contrast with the read/writeDocument.domainproperty in the client-side reference section.-
readonlyHTMLCollectionforms An array (HTMLCollection) of all HTMLFormElement objects in the document.
-
readonlyHTMLCollectionimages An array (HTMLCollection) of all
<img>tags in the document. Note that for compatibility with the Level 0 DOM, images defined with an<object>tag are not included in this collection.-
readonlyHTMLCollectionlinks An array (HTMLCollection) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access