You are here: Reference > JavaScript > client-side > HTML DOM

DHTML elements

Base objects:

Object Support Description
document
Represents an entire HTML document and provides possibilities for accessing, creating and manipulating all elements in the document.
DocumentFragment
The DocumentFragment object is a context-free container that is similar to the document object.
implementation
Contains information about the features supported by the browser and provides methods for creating base objects.
location
Contains information about the URL of the currently loaded document, and provides methods to navigate to a new page.
window
Represents the browser window, frame window or dialog window of a HTML document.

Top-level elements:

Tag Name Support Description
body
Specifies the main body of an HTML document.
doctype
Represents a Document Type Definition (DTD).
frameset
Specifies the layout for a set of independent window regions.
head
Provides information about the HTML document.
html
Identifies an HTML or XHTML document.

Head elements:

Tag Name Support Description
base
Specifies an explicit URL to use for all relative URLs within the document.
link
Specifies a link to an external resource.
meta
Specifies general information about the document.
script
Specifies a script block within a HTML document.
style
Specifies style sheet rules for a document.
title
Defines the title of the page.

Layout elements:

Container elements:

Tag Name Support Description
center
Specifies that the enclosed objects should be centered.
div
Defines a block of HTML content.
fieldset
Allows to group thematically related controls and labels.
legend
Defines a caption for a fieldset.

List elements:

Definition list elements:

Tag Name Support Description
dd
Indicates a definition within a definition list.
dl
Indicates a definition list.
dt
Indicates a definition term.

Other list elements:

Tag Name Support Description
dir
Indicates a multicolumn directory list.
li
Indicates a list item.
listing
Displays all characters in a fixed-width font.
menu
Indicates a short list of items.
ol
Indicates an ordered list.
ul
Indicates an unordered list.

Table elements:

Tag Name Support Description
caption
Specifies a caption for a table.
col
Specifies property defaults for a column in a table.
colgroup
Specifies property defaults for a group of columns in a table.
table
Specifies an element that arranges its contents into rows and columns.
tbody
Designates a series of rows within the body of a table.
td
Specifies a data cell in a table.
tfoot
Designates a series of rows within the footer of a table.
th
Specifies a header cell in a table.
thead
Designates a series of rows within the header of the table.
tr
Specifies a row in a table.

Frame elements:

Tag Name Support Description
frame
Specifies a nameable window region.
iframe
Inserts an inline frame.
noframes
Indicates alternative content to be displayed for browsers that do not support frameset elements.
frameset
Specifies the layout for a set of independent window regions.

Text elements:

String of text as a node:

Object Support Description
TextNode
Represents a text as a node.

Phrase elements:

Tag Name Support Description
abbr
Indicates a sequence of characters that define an abbreviation for a word.
acronym
Indicates an acronym abbreviation.
address
Specifies contact information, such as an address or signature.
cite
Indicates a citation, usually text rendered in italics by the browser.
code
Specifies a fragment of computer code.
dfn
Indicates the defining instance of the enclosed term.
em
Indicates an emphasized text, usually text rendered in italics by the browser.
kbd
Indicates text to be entered by the user, usually text rendered in a monospaced font.
samp
Indicates sample text.
strong
Specifies that the enclosed text should be displayed in bold type.
var
Indicates a variable, usually text rendered in italics by the browser.

Preformatted font elements:

Tag Name Support Description
b
Specifies that the enclosed text should be displayed in bold.
basefont
Specifies a default font value for the document.
big
Specifies that the enclosed text should be displayed in a larger font.
blockquote
Specifies a long quotation.
del
Indicates a deletion, usually text rendered as strike-through text by the browser.
h1
Specifies document heading.
h2
Specifies document heading.
h3
Specifies document heading.
h4
Specifies document heading.
h5
Specifies document heading.
h6
Specifies document heading.
i
Specifies that the enclosed text should be displayed in italics.
rt
Marks the ruby text for a ruby element.
ruby
Designates an annotation or a pronunciation guide for words and phrases.
s
Specifies that the enclosed text should be displayed in strike-through type.
small
Specifies that the enclosed text should be displayed in a smaller font.
span
Specifies an inline text group.
strike
Specifies that the enclosed text should be displayed in strike-through type.
sub
Specifies that the enclosed text should be displayed as subscripted text.
sup
Specifies that the enclosed text should be displayed as superscript text.
tt
Specifies that the enclosed text should be displayed in a fixed-width font.
u
Specifies that the enclosed text should be displayed as underlined text.
xmp
Specifies that the enclosed text is an example.

Special text content elements:

Tag Name Support Description
a
Defines a link to the same or to another document, or defines a destination anchor.
bdo
Specifies a bidirectional text.
blink
Specifies that the enclosed text should flash slowly.
font
Specifies a new font, size, and color to be used for the enclosed text.
ins
Specifies an editorial insertion of content.
marquee
Specifies a scrolling text marquee.
p
Specifies a paragraph.
plaintext
Specifies that the rest of the contents in the document should be displayed as plain text.
pre
Indicates that the enclosed text is preformatted.
q
Specifies a short quotation.

Line breaking rule elements:

Tag Name Support Description
br
Inserts a line break.
hr
Draws a horizontal rule.
nobr
Renders the enclosed text without line breaks.
wbr
Indicates where a line break is allowed to be inserted if needed within a nobr element.

Form and control elements:

Tag Name Support Description
button
Specifies a form button.
form
Creates a container element for controls.
input:button
Creates a push button control.
input:checkbox
Creates a check box control.
input:file
Creates a file selector object with a single-line text input control and a browse button.
input:hidden
Creates a hidden text control.
input:image
Creates an image control.
input:password
Creates a single-line text input control, with the text rendered in such a way as to hide the real characters.
input:radio
Creates a radio button control.
input:range
Creates a slider control.
input:reset
Creates a reset button. Clicking on a reset button resets all controls within the form to their initial values.
input:search
Creates a search field. It contains a single-line text input control with a search history dropdown list.
input:submit
Creates a submit button. Clicking on a submit button sends the named contents of the form to the server.
input:text
Creates a single-line text input control.
isindex
Indicates a single line text input.
keygen
Allows a form to be submitted with key encryption. The element generates a secure key and submits the public key with the form.
label
Specifies a description to a HTML element.
optgroup
Defines a group of option elements in a select form field.
option
Specifies an item in a selection list.
select
Creates a drop-down list or list box element.
textarea
Creates a multiline text input control.

Embedded and external document resource elements:

Tag Name Support Description
link
Specifies a link to an external resource.
noscript
Indicates alternative content to be displayed for browsers that do not support scripting.
script
Specifies a script block within a HTML document.
style
Specifies style sheet rules for a document.
xml
Defines XML data content in a HTML page.

Image and image map elements:

Tag Name Support Description
area
Defines a hyperlink region within an image map.
img
Embeds an image or video clip into the current document.
map
Contains coordinate data for client-side image maps.

Applet, media file and plug-in elements:

Tag Name Support Description
applet
Allows embedding a Java applet.
bgsound
Associates a background sound with a page.
embed
Specifies an object to be embedded.
object
Specifies an object to be included in an HTML document.
param
Specifies a parameter to be passed to an applet, embed, or object element.

Comment elements:

Tag Name Support Description
comment
Indicates a non-displayed comment.
CommentNode
Allows inserting remarks into the source code.

Tag collections:

Tag Name Support Description
all
Represents a collection of all elements contained by an element or the entire document.
anchors
Represents a collection of all anchor elements in the document that have a name property specified.
applets
Represents a collection of all applet elements in the current document.
areas
Represents a collection of all area elements in a map element.
cells
Represents a collection of all td or th elements that belong to a table or tr element.
childNodes
Represents a collection of all nodes that are direct descendants of an element.
children
3.5
Represents a collection of all element nodes that are direct descendants of an element.
elements
Represents a collection of all form control elements in a form.
embeds
Represents a collection of all embed elements in the current document.
forms
Represents a collection of all form elements in the current document.
frames
Represents a collection of all window objects that belong to frame and iframe elements in the current document.
images
Represents a collection of all img elements in the current document.
links
Represents a collection of all anchor and area elements in the current document that have a href property specified.
NodeList
Represents a live collection of nodes.
options
Represents a collection of all option elements in a select element.
rows
Represents a collection of tr elements in a table, tfoot, thead or tbody element.
scripts
Represents a collection of all script elements in the current document.
tBodies
Represents a collection of tbody elements in a table element.

Namespace objects:

Tag Name Support Description
namespace
Represents a namespace that has been declared for custom elements in HTML.
namespaces
Represents a collection of namespaces that have been declared for custom elements in HTML.

Attribute objects:

Tag Name Support Description
attribute
Represents an attribute of an element in an HTML or XML document.
attributes
Represents a collection of attribute nodes that belong to an element.

String objects:

Tag Name Support Description
DOMStringList
Represents a collection of String objects.

File objects:

Tag Name Support Description
File
3
Contains information about a file and provides access to its contents.
FileList
3
Represents a collection of File objects.

Exception objects:

Tag Name Support Description
DOMException
9
Represents a run-time error caused by a DOM operation.

DHTML properties

Property Support Description
_content
(window)
Returns a reference to the topmost ancestor window object in the window hierarchy.
abbr
(td, th)
Sets or retrieves an abbreviation for a table header or table cell data.
accept
(form, input:file)
Sets or retrieves a comma-separated list of accepted content types.
acceptCharset
(form)
Sets or retrieves a list of character encodings for a form.
accessKey
Sets or retrieves an access key to an element.
action
(form)
Sets or retrieves a form processing agent. With this property you can set an URL to call when the form is sent.
activeElement
(document)
Returns a reference to the object that is currently designated as the active element in the document.
align
(embed, img, object, ...)
Sets or retrieves the object's position with respect to the surrounding text.
align
(caption, legend)
Sets or retrieves the alignment of a caption and legend element relative to a table or fieldset element.
align
(div, Hn, p, td, tr, ...)
Sets or retrieves the horizontal alignment of the contents in an object.
align
(hr, iframe, marquee, table)
Sets or retrieves the horizontal alignment of an object relative to its parent.
aLink
(body)
Sets or retrieves the color of the active hypertext links in the entire document.
alinkColor
(document)
Sets or retrieves the color of active hypertext links in the entire document.
allowTransparency
(frame, iframe)
9
Sets or retrieves whether a frame element (frame or iframe) can be transparent.
alt
(area, img, object, ...)
Sets or retrieves an alternate text that is displayed when the file associated with the element cannot be displayed.
altHtml
(applet, object)
Sets or retrieves the HTML content that is executed if the object or applet element fails to load.
archive
(applet, object)
Sets or retrieves a space-separated list of URLs for archive files.
attributes
Represents a collection of attribute nodes that belong to an element.
autocomplete
(form, input)
Sets or retrieves whether the text field should give the user some suggestion during typing.
axis
(td, th)
Sets or retrieves a comma-separated list of category names.
background
(body)
Sets or retrieves the background picture, which will be tiled to provide the body background.
background
(table, td, th)
Sets or retrieves the background picture, which will be tiled if it is smaller than the object's dimensions.
balance
(bgsound)
Specifies or returns how the volume will be divided between the left and right speakers.
BaseHref
(applet, object)
Returns the base URL for the object element.
baseURI
10
Returns the base URL for the object.
behavior
(marquee)
Sets or retrieves the movement of text across the marquee element.
bgColor
(body, table, td, ...)
Sets or retrieves the background color.
bgColor
(col, colgroup)
Sets or retrieves the background color of one or more specified columns in a table element.
bgColor
(document)
Sets or retrieves the background color of the document.
bgProperties
(body)
Sets or retrieves whether the background picture, specified by the background property, is fixed or scrollable.
body
(document)
Specifies the main body of an HTML document.
border
(frameset)
Specifies or returns the width of the border between frames.
border
(img, object, table, ...)
Sets or retrieves the thickness of the border.
borderColor
(frame, frameset, table, ...)
Sets or retrieves the color of the border.
borderColorDark
(table, td, th, tr)
Sets or retrieves the color used to draw the right and bottom borders of a table.
borderColorLight
(table, td, th, tr)
Sets or retrieves the color used to draw the left and top borders of a table.
bottomMargin
(body)
Specifies or returns the thickness of the bottom margin in the document body.
canHaveChildren
Retrieves a Boolean value that indicates whether the element can contain child elements.
canHaveHTML
Retrieves a Boolean value that indicates whether the element can contain HTML formatted text.
caption
(table)
Returns the caption element of the current table object.
cellIndex
(td, th)
Returns a zero-based integer that indicates the position of a cell (td or th) in the cells collection of a table row.
cellPadding
(table)
Specifies or returns the amount of space between the border of a cell and its contents in a table.
cellSpacing
(table)
Sets or retrieves the amount of space between the border of the cells in a table.
ch
(col, tbody, td, th, tr, ...)
Sets or retrieves an alignment character. The alignment of the contents of the cells in the same column depends on this character. The first occurrence of the alignment character in each cell in a column will be on a vertical axis.
characterSet
(document, XMLDocument)
9
Returns the character encoding of the document.
charset
(document, link, meta, ...)
Sets or retrieves the character encoding of the document, a linked document or a script block.
checked
(input(checkbox, radio))
Sets or retrieves the state of a check box or a radio button.
childElementCount
93.5
Returns the number of element nodes that are direct descendants of the current element.
chOff
(col, tbody, td, th, tr, ...)
Sets or retrieves the horizontal offset of the ch and char properties. The direction of the offset is the same as the direction of the text (dir property).
cite
Sets or retrieves the location of the source document.
classid
(object)
Sets or retrieves the class identifier of the embedded application.
classId
(object)
Sets or retrieves the class identifier of the embedded application.
className
Sets or retrieves the style class or classes that belong to the element.
clear
(address, br, Hn, pre, ...)
Specifies or returns the position of the element in relation to floating objects.
clientHeight
Returns the height of the visible area for an object, in pixels. The value contains the height with the padding, but it does not include the scrollBar, border, and the margin.
clientLeft
Returns the width of the left border in pixels.
clientTop
Returns the height of the top border in pixels.
clientWidth
Returns the width of the visible area for an object, in pixels. The value contains the width with the padding, but does not include the scrollBar, border, and the margin.
code
(applet, object)
Sets or retrieves the name of the Java class file that contains the Java applet.
code
(DOMException)
9
Returns an integer that specifies the type of the error.
codeBase
(applet, object)
Sets or retrieves the base location that relative URLs specified in the classid, data and archive properties are relative to.
codeType
(applet, object)
Sets or retrieves the MIME type (media type) of the application that should be used by the object element.
color
(basefont, font, hr)
Sets or retrieves the color of the text or line.
cols
(frameset)
Sets or retrieves the widths of the columns within a frameset element. All frame elements in the same column has the same width as the column.
cols
(table)
Specifies or returns the number of columns in a table.
cols
(textarea)
Specifies or returns the width of a textarea, in characters.
colSpan
(td, th)
Sets or retrieves how many columns wide a cell should be.
compact
(dir, dl, menu, ol, ul)
Sets or retrieves whether extra space between list items should be removed.
compatMode
(document)
Returns whether rendering works in Quirks or Strict mode.
complete
(img, input:image)
Returns a Boolean value that indicates whether the loading of an element is finished or not.
content
(meta)
Sets or returns the meta information itself.
content
(window)
Returns a reference to the topmost ancestor window object in the window hierarchy.
contentDocument
(applet, frame, iframe, object)
8
Retrieves the document generated by a frame or iframe element.
contentEditable
3
Sets or retrieves whether the contents of the object are editable.
contentWindow
(frame, iframe)
Retrieves the window generated by a frame or iframe element.
contentType
(document, XMLDocument)
Sets or retrieves the MIME type of the current document.
coords
(a, area)
Sets or retrieves the position of a shape. You can select the type of shape with the shape property.
data
(object)
Sets or retrieves the location of the data for an object.
data
(comment, CommentNode, TextNode)
Sets or returns the text content of a CommentNode, TextNode or comment element.
dateTime
Sets or retrieves the timestamp when a deletion or insertion was made.
declare
(applet, object)
Sets or retrieves whether an object is only a declaration (it isn't downloaded until it's needed).
defaultCharset
(document)
Returns the character set that belongs to the current regional and language settings of the operating system.
defaultChecked
(input)
Specifies or returns the initial state of a input:checkbox or input:radio elements. The initial state can be set with the CHECKED attribute in HTML.
defaultSelected
(option)
Specifies or returns the initial state of an option element. The initial state can be set with the SELECTED attribute in HTML.
defaultValue
(input, textarea, ...)
Specifies or returns the initial value of the object. The initial state can be set with the value attribute in HTML.
defaultView
(document, XMLDocument)
9
Retrieves a reference to the default AbstractView object for the current document.
defer
(script)
3.5
Sets or retrieves whether the script is going to generate any document content.
designMode
(document)
Sets or returns a string value that indicates whether editing is enabled for the document.
dir
(a, abbr, acronym, ...)
Sets or retrieves the text direction as related to the lang property.
dir
(document, XMLDocument)
Sets or retrieves the horizontal rendering order in the current document.
direction
(marquee)
Specifies or retrieves in which direction the marquee should scroll.
disabled
Sets or retrieves the state of an object for user interaction.
doctype
(document, XMLDocument)
Represents a Document Type Definition (DTD).
document
(window)
Represents an entire HTML document and provides possibilities for accessing, creating and manipulating all elements in the document.
documentElement
(document, XMLDocument)
Returns a reference to the root element node of the document.
documentURI
(document, XMLDocument)
Sets or returns the absolute location of the document.
domain
(document)
Sets or returns the hostname of the server that served the current document.
draggable
3.55
Sets or retrieves whether an element is draggable.
dynsrc
(img, input:image)
Sets or retrieves the location of a movie file or VRML.
encoding
(form)
Sets or retrieves how form data should be encoded for submitting to the server.
enctype
(form)
Sets or retrieves how form data should be encoded for submitting to the server.
entities
(doctype)
Returns a collection of available entity nodes in the document.
expando
(attribute, document)
Sets or returns a Boolean value that indicates whether additional properties can be used within the object.
face
(basefont, font)
Specifies or returns the font face for a page or for a font element.
fgColor
(document)
Sets or retrieves the text color for the document.
fileCreatedDate
(document, img)
Returns the date when the file was created.
fileModifiedDate
(document, img)
Returns the date when the file was last modified.
fileName
(File)
3
Returns a string that identifies the name of the file. Deprecated in Firefox from version 3.6, use the name property instead.
files
(input:file)
3
Returns a FileList collection that represents the file or files selected with the current input:file element.
fileSize
(document, img)
Returns the size of the file.
fileSize
(File)
3
Returns an integer that specifies the size of the file in bytes. Deprecated in Firefox from version 3.6, use the size property instead.
fileUpdatedDate
(document, img)
Returns the date when the file was last updated.
firstChild
Returns a reference to the first child of the current element.
firstElementChild
93.5
Returns a reference to the first child element of the current element.
form
(input, select, textarea, ...)
Returns a reference to the form element in which the object is placed.
frame
(table)
Sets or retrieves which borders of a table element should be displayed.
frameBorder
(frame, frameset, iframe)
Sets or retrieves whether the frame is surrounded by a 3-D border.
frameElement
(window)
Returns a reference to the frame or iframe element that hosts the current window in the parent document.
frameSpacing
(frameset)
Sets or retrieves the space between frames in pixels.
galleryImg
(img, input:image)
7
Sets or retrieves whether the My Pictures toolbar in Internet Explorer is enabled for the current img.
hash
(location, a, area)
Sets or returns the subsection (begins with a '#' sign) of the URL assigned to the object.
headers
(td, th)
Sets or retrieves a list of header cells that provide header information for the current data cell.
height
(embed, iframe, img, table, ...)
Specifies or returns the height of an element.
height
(document)
Retrieves the height of the document's contents.
hidden
(embed)
Specifies or returns a string value that indicates whether an embed object is visible.
hideFocus
Specifies or returns whether a dotted rectangle (focus rectangle) is drawn around an object while it has focus.
host
(location, a, area)
Specifies or retrieves the host name and port of the URL assigned to the object.
hostname
(location, a, area)
Specifies or retrieves the host name of the URL assigned to the object.
href
(base)
Sets or retrieves the base URL to be used throughout the document for relative URL addresses.
href
(location, a, area, link)
Specifies or returns the location of the destination.
hreflang
(a, link)
Sets or retrieves the language of a linked resource or anchor element.
hspace
(iframe, img, object, ...)
Specifies or returns the number of pixels to use as a margin at the left and right sides of the object.
htmlFor
(label)
Sets or retrieves the identifier of the object to which the label element is attached. The label element can be used to associate information with controls.
htmlFor
(script)
Sets or retrieves the identifier of the element to which the script is bound when a specific event is fired for the element.
httpEquiv
(meta)
Sets or retrieves information for HTTP response message headers. Use it with the content property to create a well-defined meta tag.
id
Sets or retrieves a unique identifier for the object.
indeterminate
(input:checkbox)
3.6
Specifies or returns a Boolean value that indicates whether the state of a checkbox has changed.
index
(optgroup, option)
Specifies or returns an integer that indicates the position of an option element within a selection list.
innerHeight
(window)
9
Returns the height of the browser's client area, including the horizontal scrollbar, if rendered.
innerHTML
Sets or retrieves the inner HTML content (the source code between the opening and closing tags) of an element.
innerText
Sets or returns the text content of an element including the text content of its descendants.
innerWidth
(window)
9
Returns the width of the browser's client area, including the vertical scrollbar, if rendered.
inputEncoding
(document, XMLDocument)
9
Returns the character encoding used for parsing the document.
internalSubset
(doctype)
Returns the entire contents of the doctype element as a string.
isContentEditable
Returns a Boolean value that indicates whether the contents of the object are editable by the user.
isDisabled
Returns a Boolean value that indicates whether the object is disabled.
isElementContentWhitespace
(TextNode)
Returns a Boolean value that indicates whether the current TextNode only contains whitespaces.
isId
(attribute)
5
Returns whether the current attribute node is an id attribute or not.
isMap
(img)
Sets or retrieves a Boolean value that indicates whether an img is a server-side or client-side image map.
isMultiLine
Returns a Boolean value that indicates whether the contents of an element can be multiline or not.
isTextEdit
Returns a Boolean value that indicates whether the createTextRange method can be used for the element.
label
(optgroup)
Sets or retrieves the text to show as the contents of the option group element.
label
(option)
Sets or retrieves a short label for an option element.
lang
Specifies or returns the language of the element.
language
(script, a, abbr, ...)
Sets or retrieves the scripting language for the current element. Use it only for the script element.
lastChild
Returns a reference to the last child of the current element.
lastElementChild
93.5
Returns a reference to the last child element of the current element.
lastModified
(document, XMLDocument)
Retrieves the date and time when the document was last modified.
leftMargin
(body)
Sets or retrieves the left margin for the document body in pixels.
length
(form, keygen, select)
Returns the number of form controls in a form element or the number of options in a select or keygen element.
length
(comment, CommentNode, TextNode)
Returns the number of characters within a TextNode, CommentNode or comment object.
length
(window)
Returns the number of frames (frame or iframe) in the current window.
link
(body)
Sets or retrieves the color of the hypertext links in the entire document that have not been visited and activated yet.
linkColor
(document)
Sets or retrieves the color of the hypertext links in the entire document that have not been visited and activated yet.
location
(document, window, XMLDocument)
Contains information about the URL of the currently loaded document, and provides methods to navigate to a new page.
longDesc
(frame, iframe, img)
Specifies or retrieves the URI (Uniform Resource Identifier) of the long description of a frame, iframe or img element.
loop
(bgsound, img, input:image)
Specifies or returns the number of repeats for a sound or video clip.
loop
(embed)
Sets or retrieves the type of repetition of the embedded media.
loop
(marquee)
Specifies or returns the number of times a marquee is to be played.
lowsrc
(img, input:image)
Specifies or returns the location of a lower resolution image to display.
marginHeight
(frame, iframe)
Sets or retrieves the top and bottom margins for a frame element.
marginWidth
(frame, iframe)
Sets or retrieves the left and right margins for a frame element.
max
(input:range)
Sets or retrieves the maximum value of a range type input object (slider).
maxLength
(input, isindex)
Sets or retrieves the maximum number of characters allowed in a text box.
mediaType
(File)
3.6
Returns a string that identifies the MIME type of the file. Supported in Firefox from version 3.6.
message
(DOMException)
9
Returns a string that contains information about the error.
method
(form)
Specifies or returns how the data of a form should be submitted to the server. When the user clicks on the submit button of a form, the data of the named elements in the form will be sent. The data contains the name and the value of the named element.
Methods
(a)
Specifies or returns a comma-separated list of HTTP METHODS supported by the object and accessible to the user.
mimeType
(document, a, img)
Retrieves the type of the document file or the type of a linked file.
min
(input:range)
Sets or retrieves the minimum value of a range type input object (slider).
multiple
(keygen, select)
Sets or retrieves whether more than one item from a list can be selected.
multiple
(input:file)
3.6
Sets or retrieves whether more than one file can be selected with the current input:file element.
name
(a)
Sets or retrieves the name of a target anchor.
name
(abbr, acronym, address, ...)
Sets or retrieves the name of an element.
name
(attribute)
Returns the name of the current attribute.
name
(doctype)
Returns the name of the doctype element.
name
(DOMException)
Returns an string that contains the type of the error in string format.
name
(File)
3.6
Returns a string that identifies the name of the file. Supported in Firefox from version 3.6.
name
(frame, iframe)
Sets or retrieves the initial name of the contained window.
name
(input, select, textarea, ...)
Sets or retrieves the name of a form control that affects the contents of the message submitted to the server.
name
(map)
Sets or retrieves the name of an image map that helps to establish a relationship between an image and an image map.
name
(meta)
Sets or retrieves the name given to the meta information. Use it with the content property attribute to create a well-defined meta tag.
name
(namespace)
Returns the local name of a namespace.
name
(param)
Specifies or returns what data is being passed in the value property to the object.
name
(window)
Sets or retrieves the name of the current window object, which is used to identify the window.
nameProp
(a, img)
Returns the file name from the URL specified by the href or src property of the current element.
naturalHeight
(img)
9
Retrieves the original height of the linked image.
naturalWidth
(img)
9
Retrieves the original width of the linked image.
nextElementSibling
93.5
Returns a reference to the next child element of the current element's parent.
nextSibling
Returns a reference to the next child of the current element's parent.
nodeName
Returns the name of the current node.
nodeType
Returns an integer that indicates the type of the node.
nodeValue
Sets or returns the value of the current node.
noHref
(area)
Sets or retrieves whether an area is a link.
noResize
(frame)
Specifies or returns whether a frame window is resizable.
noShade
(hr)
Specifies or returns whether the horizontal rule should be displayed as flat instead of three dimensional.
notations
(doctype)
Returns a collection of notation nodes within the current doctype element.
noWrap
(body, dd, div, dt, td, th)
Specifies or returns whether the text in a table cell can be wrapped.
object
(applet, object)
Returns a reference to the object embedded with a object or applet element.
offscreenBuffering
(window)
Specifies or returns whether the off-screen buffer needs to be used for drawing.
offsetHeight
Returns the height of the visible area for an object, in pixels. The value contains the height with the padding, scrollBar, and the border, but does not include the margin.
offsetLeft
Returns the left position of an object relative to the left side of its offsetParent element, in pixels.
offsetParent
Returns a reference to the closest ancestor element in the DOM hierarchy from which the position of the current element is calculated.
offsetTop
Returns the top position of the object relative to the top side of its offsetParent element, in pixels.
offsetWidth
Returns the width of the visible area for an object, in pixels. The value contains the width with the padding, scrollBar, and the border, but does not include the margin.
opener
(window)
Sets or retrieves a reference to the window that opened the current document.
outerHTML
Sets or retrieves the outer HTML content (the source code including the opening and closing tags) of an element.
outerText
Sets or returns the text content of an element including the text content of its descendants.
ownerDocument
Returns the document object that contains the current node.
ownerElement
(attribute)
8
Returns the element object that contains the current attribute.
pageXOffset
(window)
9
Retrieves the number of pixels by which the contents of the document are scrolled to left.
pageYOffset
(window)
9
Retrieves the number of pixels by which the contents of the document are scrolled upward.
palette
(embed)
Returns the palette used for the embedded document.
parent
(window)
Returns a reference to the immediate parent window object in the window hierarchy.
parentElement
Returns the parent element of the object in the DOM hierarchy.
parentNode
Returns the parent element of the current node in the DOM hierarchy.
parentTextEdit
Returns the closest ancestor element of the current element in the DOM hierarchy that can be used to create a TextRange object.
parentWindow
(document)
Returns a reference to the window object that contains the current document.
pathname
(location, a, area)
Specifies or retrieves the path component of the URL assigned to the object (relative to the host).
placeholder
Sets or retrieves the initial value of the text field.
plugins
(document)
Represents a collection of all embed elements in the current document.
pluginspage
(embed)
Sets or retrieves the URL for installing a plug-in. If an embedded plug-in is not accessible on the client site, the URL can be used by the browser to download and install the required component.
port
(location, a, area)
Sets or retrieves the port component of the URL assigned to the object.
previousElementSibling
93.5
Returns a reference to the previous child element of the current element's parent.
previousSibling
Returns a reference to the previous node of the current element's parent.
profile
(head)
Specifies or returns one or more URIs for a meta-information dictionary.
prompt
(isindex)
Specifies a prompt message for the input field.
protocol
(document, location, a, area, img)
Sets or retrieves the protocol component of the URL assigned to the object.
protocolLong
(a)
Retrieves a long description about the protocol component of the URL assigned to the object.
publicId
(doctype)
Returns the public identifier portion of the doctype element.
readOnly
(input, textarea, ...)
Sets or retrieves whether the contents of the element are changeable.
readyState
(document, a, abbr, ...)
3.6
Returns a string value that represents the state of the object.
readyState
(object)
Returns an integer value that indicates the state of the object element.
referrer
(document, XMLDocument)
Retrieves the URL of the document that loaded the current page.
rel
(a, link)
Specifies or returns the relationship between the current document and the destination of an anchor or link.
rev
(a, link)
Specifies or returns a reverse relationship from an anchor or link to the current document.
rightMargin
(body)
Sets or retrieves the right margin for the document body in pixels.
rowIndex
(tr)
Returns the position of a row in the rows collection of the table.
rows
(frameset)
Sets or retrieves the heights of the rows within a frameset element. All frame elements in the same row have the same height as the row.
rows
(textarea)
Sets or retrieves the number of visible rows within a textarea element.
rowSpan
(td, th)
Specifies or returns how many rows high a table cell should be.
rules
(table)
Specifies or returns which borders will appear between cells within a table.
scheme
(meta)
Specifies or returns how the value of content should be interpreted, when name is used.
scope
(td, th)
Sets or retrieves the type of header information that belongs to a table cell.
scopeName
Retrieves the local name of the namespace declared for the current element.
scroll
(body)
Sets or retrieves the state of the document window's scrollbars.
scrollAmount
(marquee)
Sets or retrieves the width in pixels between successive displays of the scrolling text in a marquee.
scrollDelay
(marquee)
Specifies or returns the time delay between successive displays of the text in a marquee element in milliseconds.
scrollHeight
Returns the total height of an element's contents, in pixels. The value contains the height with the padding, but does not include the scrollBar, border, and the margin.
scrolling
(frame, iframe)
Sets or retrieves whether a frame has scrollbars.
scrollLeft
Sets or retrieves the number of pixels by which the contents of an object are scrolled to the left.
scrollMaxX
(window)
Returns the maximum number of pixels by which the contents of the document can be scrolled horizontally.
scrollMaxY
(window)
Returns the maximum number of pixels by which the contents of the document can be scrolled vertically.
scrollTop
Sets or retrieves the number of pixels by which the contents of an object are scrolled upward.
scrollWidth
Returns the total width of an element's contents, in pixels. The value contains the width with the padding, but does not include the scrollBar, border, and the margin.
scrollX
(window)
Retrieves the number of pixels by which the contents of the document are scrolled to the left.
scrollY
(window)
Retrieves the number of pixels by which the contents of the document are scrolled upward.
search
(location, a, area)
Sets or returns the subsection (begins with a '?' sign) of the URL assigned to the object.
sectionRowIndex
(tr)
Returns the position of a row in the rows collection of a tbody, thead or tfoot element.
selected
(option)
Sets or retrieves the state of an option element.
selectedIndex
(options, keygen, select)
Specifies or returns the zero-based index of the selected option in a select object or in the selection list of a keygen object.
selectionEnd
(input, textarea, ...)
9
Specifies or returns the end position of the selected text within the current element.
selectionStart
(input, textarea, ...)
9
Specifies or returns the start position of the selected text within the current element.
self
(window)
Returns a reference to the window object itself.
shape
(a, area)
Sets or retrieves the shape type of the selectable region for a hypertext or an area.
size
(basefont, font)
Specifies or returns the size of the font.
size
(File)
3.6
Returns an integer that specifies the size of the file in bytes. Supported in Firefox from version 3.6.
size
(hr)
Sets or retrieves the height of the horizontal rule.
size
(input, isindex)
Specifies or returns the width of a control, in characters.
size
(keygen, select)
Specifies or returns the count of the visible option items in a selection list. The selection list can be a select element or the selection list of a keygen element.
sourceIndex
Returns the position of the current object in the all collection of the document.
span
(col, colgroup)
Specifies or returns the number of columns in a column group that share the settings defined in the col element.
specified
(attribute)
Retrieves a Boolean value that indicates whether an attribute is specified.
spellcheck
Sets or retrieves whether the automatic spellchecker is enabled.
src
(embed, iframe, img, xml, ...)
Sets or retrieves the location of an associated file for an object.
src
(bgsound)
Sets or retrieves the URL of a sound file to be played.
src
(script)
Sets or retrieves the location of a file containing scripting code.
standby
(applet, object)
Specifies or returns a text message that will be displayed while the object is loading.
start
(img, input:image)
Specifies or returns the starting time of a video clip.
start
(ol)
Specifies or returns the starting number for an ordered list.
status
(input, textarea)
Returns a Boolean value that indicates whether the current element is selected.
status
(window)
Sets the message in the status bar or retrieves the previously specified value.
step
(input:range)
Sets the discrete step size of the input:range element.
summary
(table)
Specifies or returns a summary of the data represented in a table.
systemId
(doctype)
Returns the system identifier portion of the doctype element.
tabIndex
Specifies or returns the tabbing order for keyboard navigation using the TAB key.
tagName
Returns the tag name of the current element.
tagUrn
Sets or retrieves the Uniform Resource Name (URN) of the namespace declared for the current element.
target
(a, area, base, form, link)
Specifies or returns the target window or frame where the document is to be opened.
text
(body)
Specifies or returns the color of the text in the document body.
text
(script, title, CommentNode, ...)
Sets or returns a string that corresponds the contents of the element.
text
(optgroup, option)
Sets or returns a string that represents the text of an option element.
textContent
9
Sets or returns the text content of an element including the text content of its descendants.
textLength
(input, textarea)
5
Returns the length of the text in a form control.
tFoot
(table)
Returns a reference to the tfoot element of the table.
tHead
(table)
Returns a reference to the thead element of the table.
title
(a, abbr, acronym, ...)
Specifies or returns a tooltip for an element.
title
(document, XMLDocument)
Sets or returns the title of the current document.
top
(window)
Returns a reference to the topmost ancestor window object in the window hierarchy.
topMargin
(body)
Specifies or returns the thickness of the top margin in the document body.
trueSpeed
(marquee)
Sets or retrieves whether the value of the scrollDelay property should be taken as an exact value or not.
type
(a, applet, embed, link, object)
Specifies or returns the content type (MIME type) of the object or the linked object.
type
(button)
Sets or retrieves the type of a button.
type
(dir, li, menu, ol, ul)
Specifies or returns the numbering style of a list.
type
(input)
Sets or retrieves the type of the input element.
type
(keygen, select)
Returns a string that identifies whether more than one item can be selected in a selection list.
type
(param)
Specifies or returns the MIME type of the resource referenced by the value property. The type property can be used only if the value of the valueType property is set to 'ref'.
type
(script)
Sets or retrieves the type of scripting language to use.
type
(style)
Specifies or returns the type of style sheet language.
type
(textarea)
Returns the type of a textarea element.
uniqueID
Returns the unique identifier generated by the browser for the object.
units
(embed)
Specifies or returns the measurement system used for the height and width properties of an embed object.
unselectable
Sets or retrieves whether the selection process can start in an element's content.
URL
(document, XMLDocument)
Specifies or returns the location of the current document.
URLUnencoded
(document)
Returns a string value that represents the unencoded version of the location of the current document.
urn
(a)
Specifies or returns a Uniform Resource Name (URN) for a linked object.
urn
(namespace)
Returns the Uniform Resource Name (URN) of a namespace.
useMap
(applet, img, object, ...)
Sets or retrieves the URL to use as an image map.
vAlign
(caption)
Specifies or returns the vertical position of the caption element within a table.
vAlign
(col, tbody, td, tr, ...)
Specifies or returns the vertical alignment of the text within an object.
value
(attribute)
Sets or returns the value of the current attribute.
value
(input, isindex, textarea, ...)
Specifies or returns the value of the control.
value
(input:file)
Returns a string that contains the path or the name of the file or files selected with the current input:file element.
value
(li)
Specifies or returns the number of a list item.
value
(keygen, option, select)
Specifies or returns the value of an option or a select element.
value
(param)
Specifies or returns the value of a run-time parameter specified by name.
valueType
(param)
Specifies or returns the type of the object that is set with the value property.
vcard_name
(input(password, text))
Specifies or returns the vCard type to use for the Autocomplete box.
version
(html)
Specifies or returns which HTML DTD version governs the current document.
vLink
(body)
Sets or retrieves the color of the visited hypertext links in the entire document.
vlinkColor
(document)
Sets or retrieves the color of the visited hypertext links in the entire document.
volume
(bgsound)
Specifies or returns the volume for the background sound.
vspace
(iframe, img, object, ...)
Specifies or returns the number of pixels to use as a margin at the top and bottom sides of an object.
width
(embed, iframe, img, table, ...)
Specifies or returns the default width of the element.
width
(document)
Retrieves the width of the browser window's client area.
width
(pre)
Specifies or returns the preferred count of characters for each line in a pre element. If a line is longer than the specified character count, the browser will try to wrap it.
wrap
(textarea)
Specifies or returns the word wrapping behavior.
x
(img)
Returns the left position of an image relative to the left side of its offsetParent element, in pixels.
XMLDocument
(xml)
9
Returns a reference to the XMLDocument object that represents the contents of an xml element.
y
(img)
Returns the top position of an image relative to the top side of its offsetParent element, in pixels.

DHTML methods

Method Support Description
add
(select)
Inserts an option element before the specified option element in the options collection of the current select element.
adoptNode
(document, XMLDocument)
9
Moves a node from another document to the current document.
appendChild
Inserts an element after the last child of the current element.
appendData
(comment, CommentNode, TextNode)
Appends the specified text content to the end of the current TextNode, CommentNode or comment element.
applyElement
Inserts the specified element as a child or parent of the current element.
assign
(location)
Overrides the location of the current document, so it effectively loads a new document.
atob
(window)
Decodes a base-64 encoded string.
btoa
(window)
Creates encoded data from the given string, using base-64 encoding.
clear
(document)
9
Clears the entire contents of the currently opened document.
clearAttributes
Clears all attributes from the current element, except the id, name, style, value and event attributes.
clearInterval
(window)
Clears the periodically repeated action that was previously set by the setInterval method.
clearTimeout
(window)
Clears the delayed action that was previously set by the setTimeout method.
cloneNode
Returns an exact copy of the current node.
compareDocumentPosition
9
Compares the placement of the specified node with the current node in the DOM hierarchy.
componentFromPoint
Returns the region of the current element that is located at the specified coordinates.
contains
Returns whether the specified element is a descendant of the current element.
contains
(DOMStringList)
Returns a Boolean value that indicates whether the specified string is a part of the current collection.
createAttribute
(document, XMLDocument)
Creates a new attribute node with the specified name.
createAttributeNS
(document, XMLDocument)
9
Creates a new attribute node with the specified namespace and name.
createCaption
(table)
Creates an empty caption element and adds it to the current table.
createComment
(document, XMLDocument)
Creates a CommentNode element from the specified text.
createDocument
(implementation)
9
Creates an XML document object.
createDocumentFragment
(document, XMLDocument)
Creates an empty DocumentFragment object.
createDocumentType
(implementation)
9
Creates a new doctype object.
createElement
(document, XMLDocument)
Creates an element with the specified tag name.
createElementNS
(document, XMLDocument)
9
Creates an element with the specified namespace prefix and name.
createNodeIterator
(document, XMLDocument)
93.5
Creates a NodeIterator object that can be used to iterate through the nodes in a subtree.
createNSResolver
(document, XMLDocument)
Creates an XPathNSResolver object from the specified node that can be used to get namespace URIs from namespace prefixes in the scope of the node.
createTextNode
(document, XMLDocument)
Creates a new TextNode from the specified text.
createTFoot
(table)
Creates an empty tfoot element and adds it to the current table.
createTHead
(table)
Creates an empty thead element and adds it to the current table.
createTreeWalker
(document, XMLDocument)
9
Creates a TreeWalker object that can be used to navigate through the nodes in a subtree.
deleteCaption
(table)
Removes the first caption element from the current table.
deleteCell
(tr)
Removes a cell from the current row.
deleteData
(comment, CommentNode, TextNode)
Removes the specified part of the text content of the current TextNode, CommentNode or comment element.
deleteRow
(table, tbody, tfoot, thead)
Removes a row from the current table, thead, tfoot or tbody element.
deleteTFoot
(table)
Removes the tfoot element from the current table.
deleteTHead
(table)
Removes the thead element from the table.
doImport
(namespace)
Imports the specified behavior file into the current namespace.
dump
(window)
Prints the specified message to the console.
elementFromPoint
(document)
3
Returns the element that is located at the specified coordinates.
evaluate
(document, XMLDocument)
Evaluates an XPath expression and creates an XPathResult object that represents the result.
execScript
(window)
Executes the specified script in the specified language.
find
(window)
Searches for a specified text in the document and highlights the matches.
getAdjacentText
Returns the contents of the TextNode located at the specified position relative to the current element.
getAsBinary
(File)
3
Returns the contents of the file as a binary stream.
getAsDataURL
(File)
3
Returns the contents of the file as a base64 encoded text.
getAsText
(File)
3
Returns the contents of the file as a text in the specified encoding.
getAttribute
Returns the value of the attribute with the specified name from the current element.
getAttributeNode
Returns the attribute node with the specified name from the current element.
getAttributeNodeNS
9
Returns the attribute node with the specified namespace and name from the current element.
getAttributeNS
9
Returns the value of the attribute with the specified namespace and name from the current element.
getElementById
(document, XMLDocument)
Returns the element with the specified id in the current document.
getElementsByClassName
93
Returns a NodeList collection that contains all descendant elements of the current element with the specified class name.
getElementsByName
(document, XMLDocument)
Returns a NodeList collection that contains all elements in the current document with the specified name attribute.
getElementsByTagName
Returns a NodeList collection that contains all descendant elements of the current element with the specified tag name.
getElementsByTagNameNS
9
Returns a NodeList collection that contains all descendant elements of the current element with the specified namespace URI and local name.
getExpression
9
Returns the dynamic expression for the specified DHTML property on the current element.
getNamedItem
(attributes)
Returns the attribute node with the specified name from the current attributes collection.
getNamedItemNS
(attributes)
9
Returns the attribute node with the specified namespace and name from the current attributes collection.
hasAttribute
8
Returns whether the current element has an attribute with the specified name or not.
hasAttributeNS
9
Returns whether the current element has an attribute with the specified namespace and name or not.
hasAttributes
8
Returns whether the current element has any attributes specified or not.
hasChildNodes
Returns whether the current node has any child nodes or not.
hasFeature
(implementation)
Returns whether the specified feature and version is implemented by the browser.
hasFocus
(document)
3
Returns a Boolean value indicating whether the document or any element in the document has focus.
home
(window)
Loads the browser's initial home page.
importNode
(document, XMLDocument)
9
Copies a node from another document to the current document.
insertAdjacentElement
Inserts an element at the specified position relative to the current element.
insertAdjacentHTML
Inserts a HTML formatted text at the specified position relative to the current element.
insertAdjacentText
Creates a new TextNode from the specified text and inserts it at the specified position relative to the current element.
insertBefore
Inserts an element before the specified child of the current element.
insertCell
(tr)
Creates an empty cell element and inserts it into the current row element at the specified position.
insertData
(comment, CommentNode, TextNode)
Inserts text content into the current TextNode, CommentNode or comment element at the specified position.
insertRow
(table, tbody, tfoot, thead)
Creates an empty row element and inserts it into the current table, thead, tfoot or tbody element.
isEqualNode
9
Returns whether the current node is equal to the specified one.
isSameNode
9
Returns whether the current node is the same node as the specified one.
item
(form)
Returns an element or a collection of elements from the elements collection of the current form element by name or by index.
item
(select)
Returns an element or a collection of elements from the options collection of the current select element by name or by index.
mergeAttributes
Copies all attributes and its values from the specified element to the current element.
moveRow
(table, tbody, tfoot, thead)
Moves a row to a new position in the current table, thead, tfoot or tbody element.
namedItem
(form)
Returns an element or a collection of elements from the elements collection of the current form element by name.
namedItem
(select)
Returns an element or a collection of elements from the options collection of the current select element by name.
navigate
(window)
Loads the document at the specified URL into the current window.
normalize
Puts the subtree that belongs to the current node into a 'normalized' form.
open
(document)
Opens a document stream for writing.
open
(window)
Creates a new window and loads the specified document into it.
querySelector
83.5
Returns a reference to the first descendant element of the current element, that matches the specified selectors.
querySelectorAll
83.5
Returns a NodeList collection that contains all descendant elements of the current element that match the specified selectors.
recalc
(document)
9
Recalculates all dynamic properties in the current document.
refresh
(table)
Refreshes the contents and visual appearance of the current table.
reload
(location)
Reloads the current page.
remove
(select)
Removes the specified option element or the option element at the specified position from the options collection of the current select element.
removeAttribute
Removes the attribute with the specified name from the current element.
removeAttributeNode
Removes the specified attribute node from the current element.
removeAttributeNS
9
Removes the attribute with the specified namespace and name from the current element.
removeBehavior
Removes the specified behavior from the current element.
removeChild
Removes the specified child node from the current element.
removeExpression
9
Removes the dynamic expression from the specified DHTML property on the current element.
removeNamedItem
(attributes)
Removes the attribute with the specified name from the current attributes collection and returns the removed attribute node.
removeNamedItemNS
(attributes)
9
Removes the attribute with the specified namespace and name from the current attributes collection and returns the removed attribute node.
removeNode
Removes the current element with or without its children from the document tree.
replace
(location)
Removes the URL of the current document from the document history and loads the document at the specified URL into the current window.
replaceAdjacentText
Replace the contents of the TextNode located at the specified position relative to the current element with the specified text.
replaceChild
Replaces the specified child element of the current element with a new element.
replaceData
(comment, CommentNode, TextNode)
Replaces the specified part of the text content of the current TextNode, CommentNode or comment element with a new text.
replaceNode
Replaces the current element with the specified element.
scroll
(window)
Scrolls the contents of the document window to the specified horizontal and vertical positions.
scrollBy
(window)
Scrolls the contents of the document window by the specified number of pixels.
scrollByLines
Scrolls the contents of the document vertically by the specified number of lines.
scrollByPages
Scrolls the contents of the document vertically by the specified number of pages.
scrollIntoView
Scrolls the specified element into the visible area of the document.
scrollTo
(window)
Scrolls the contents of the document window to the specified horizontal and vertical positions.
select
(input, isindex, textarea)
Highlights the entire text in the element.
setAttribute
Adds an attribute with the specified name and value to the current element.
setAttributeNode
Adds the specified attribute node to the current element.
setAttributeNodeNS
9
Adds the specified attribute node to the current element.
setAttributeNS
9
Adds an attribute with the specified namespace, name and value to the current element.
setExpression
9
Sets a dynamic expression for the specified DHTML property on the current element.
setInterval
(window)
Starts a timer that periodically repeats the execution of the specified expression.
setNamedItem
(attributes)
Adds the specified attribute node to the current attributes collection.
setNamedItemNS
(attributes)
9
Adds the specified attribute node to the current attributes collection.
setTimeout
(window)
Starts a timer that executes a piece of code after the specified number of milliseconds have elapsed.
sizeToContent
(window)
Fit the size of the current window to its contents.
splitText
(TextNode)
Breaks the current TextNode object into two TextNode objects at the specified index.
start
(marquee)
Starts to scroll the current marquee element.
stop
(marquee)
Stops the scrolling of the current marquee element.
stop
(window)
Stops the loading of the document's content. Same as clicking on the browser's stop button.
substringData
(comment, CommentNode, TextNode)
Returns the part of the current element's text content from the specified position with the specified length.
swapNode
Interchanges the positions of the current element and the specified element in the document hierarchy.
tags
(all, anchors, areas, ...)
Returns a NodeList collection that contains all elements from the current collection with the specified tag name.
updateCommands
(window)
Updates the state of the specified commands.
write
(document)
Writes a string into the document stream.
writeln
(document)
Writes a string followed by a new line character into the document stream.
User Contributed Comments

Post Content

Post Content