Name
HTMLDocument — the root of an HTML document tree
Availability
DOM Level 1 HTML
Inherits from/Overrides
Node → Document → HTMLDocument
Properties
-
readonly
HTMLCollection
anchors
An array (HTMLCollection) of all anchors in the document. For compatibility with The Level 0 DOM, this array contains only
<a>
elements that have aname
attribute specified; it does not include anchors created with anid
attribute.-
readonly
HTMLCollection
applets
An array (HTMLCollection) of all applets in a document. These include applets defined with an
<object>
tag and all<applet>
tags.-
HTMLElement
body
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
null
if there is none. Contrast with the read/writeDocument.domain
property in the client-side reference section.-
readonly
HTMLCollection
forms
An array (HTMLCollection) of all HTMLFormElement objects in the document.
-
readonly
HTMLCollection
images
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.-
readonly
HTMLCollection
links
An array (HTMLCollection) ...
Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.