Document
Name | Description | Returns |
---|---|---|
activeElement | Currently focused element. | HTMLElement |
body | body element. | HTMLBodyElement |
characterSet | document character set encoding. (read-only property). | string |
charset | Gets or sets the document character set encoding. | string |
childNodes | Returns the set of child elements. | HTMLElement[] |
compatMode | Gets compatibility mode for the document. | string |
cookie | Gets or sets the cookies. | string |
defaultCharset | Gets the default character encoding. | string |
defaultView | Returns the Window object. | Window |
dir | Gets or sets the text direction. | string |
domain | Gets or sets the domain. | string |
embeds/plugins | Returns objects representing all the embed elements. | HTMLCollection |
firstChild | the first child element of an element. | HTMLElement |
forms | all the form elements in the document. | HTMLCollection |
getElementById(id) | get the element by id. | HTMLElement |
get the elements by class. | HTMLElement[] | |
getElementsByName(name) | get the elements by name. | HTMLElement[] |
getElementsByTagName(tag)> | get the elements by type. | HTMLElement[] |
hasChildNodes() | Returns true if the current element has child elements. | boolean |
head | get the head element. | HTMLHeadElement |
images | get all the img elements. | HTMLCollection |
implementation | Provides information about the available DOM features. | DOMImplementation |
lastChild | get the last child element. | HTMLElement |
lastModified | get the last modified time of the document. | string |
links | get all the a and area elements that have href attributes. | HTMLCollection |
location | get the URL of the current document. | Location |
nextSibling | get the sibling element defined after the current element. | HTMLElement |
parentNode | get the parent element. | HTMLElement |
previousSibling | get the sibling element defined before the current element. | HTMLElement |
querySelector(selector) | get the first element that matches the specified CSS selector. | HTMLElement |
querySelectorAll(selector) | get all of the elements that match the specified CSS selector. | HTMLElement[] |
readyState | get the state of the current document. | string |
referrer | Returns the URL of the document that linked to the current document (this is the value of the corresponding HTTP header). | string |
scripts | Returns objects representing all the script elements. | HTMLCollection |
styleSheets | access the CSS stylesheets available in your document | CSSStyleSheet |
title | Gets or sets the document title. | string |
URL | the URL of the document | string |
write | append string of tags to the end of the document | void |
writeln | append string of tags to the end of the document and add new line | void |
The Document Object Events
Name | Description |
---|---|
readystatechange | Triggered when the value of the readyState property changes. |