all
alt
ch
dir
id
min
rel
top
url
URL
urn

Properties

This section describes the properties supported by Document Object Model (DOM)  objects associated with HTML elements and supporting objects.

In this section

TopicDescription

abbr

Sets or retrieves abbreviated text for the object.

accept

Sets or retrieves a comma-separated list of content types.

acceptCharset

Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.

accessKey

Sets or retrieves the access key for the object.

action

Sets or retrieves the URL to which the form content is sent for processing.

activeElement

Gets the object that has the focus when the parent document has focus.

alinkColor

Sets or gets the color of all active links in the document.

all

Note   all is no longer supported. Starting with Internet Explorer 11, use getElementById. For info, see Compatibility changes.

Returns a reference to the collection of elements contained by the object.

allowfullscreen

Enables content in an iframe to be displayed in full-screen mode.

allowTransparency

Sets or retrieves whether the object can be transparent.

alt

Sets or retrieves a text alternative to the graphic.

altHtml

Gets or sets the optional alternative HTML script to execute if the object fails to load.

anchorNode

Returns the element or node that contains the start of the selection.

anchorOffset

Retrieves the starting position of a selection that is relative to the anchorNode.

anchors

Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.

archive

Sets or retrieves a character string that can be used to implement your own archive functionality for the object.

async

Provides control of when a script executes while a document loads.

ATOMICSELECTION

Specifies whether the element and its contents must be selected as a whole, indivisible unit.

attributes

Retrieves the collection of attributes belonging to the object.

attributes

Retrieves a collection of attributes of the object.

autocomplete

This property is not supported for Windows Store apps using JavaScript.

autocomplete (input, form elements)

Specifies whether autocomplete is applied to an editable text field.

autofocus

Provides a way to direct a user to a specific field when a document loads.

background (Table, table cell, td, th elements)

Sets or retrieves the background picture tiled behind the text and graphics in the object.

balance

Sets or gets the value indicating how the volume of the background sound is divided between the left speaker and the right speaker.

BaseHref

Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.

BGCOLOR

Sets the background color behind an object.

bgProperties

Sets or gets the properties of the background picture.

body

Gets an interface pointer to the document body object.

border

Sets or retrieves the width of the border to draw around the object.

border (frame, iframe)

Sets or retrieves the space between the frames, including the 3-D border.

borderColor

Sets or retrieves the border color of the object.

borderColorDark

Sets or retrieves the color for one of the two colors used to draw the 3-D border of the object.

borderColorLight

Sets or retrieves the color for one of the two colors used to draw the 3-D border of the object.

bottom

Set or retrieves the bottom coordinate of the rectangle surrounding the object content.

bottomMargin

Sets or gets the bottom margin of the entire body of the document.

boundElements

Returns a collection of all elements on the page bound to a data set.

browserLanguage

Retrieves the current operating system language. For Windows Store apps, see Remarks.

Note  This property does not indicate the language or languages set by the user in Language Preferences, located in the Internet Options dialog box.

canHaveChildren

Gets a value indicating whether the object can contain child objects.

canHaveHTML

Retrieves the value indicating whether the object can contain rich HTML markup.

caption

Retrieves the caption object of a table.

cellIndex

Retrieves the position of the object in the cells collection of a row.

cells

Retrieves a collection of all cells in the table row or in the entire table.

ch

Sets or retrieves a value that you can use to implement your own ch functionality for the object.

characterSet

Gets the name of the character set that is used to encode the document.

charset

Sets or retrieves the character set used to encode the object.

checked

Sets or retrieves the state of the check box or radio button.

children

Retrieves a collection of DHTML Objects that are direct descendants of the object.

chOff

Sets or retrieves a value that you can use to implement your own chOff functionality for the object.

cite

Sets or retrieves reference information about the object.

class

The class is typically used to associate a particular style rule in a style sheet with the element.

classList

Returns a DOMTokenList that represents the className attribute value expressed as a string.

className

Sets or retrieves the class of the object.

clear

Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.

clientHeight

Retrieves the height of the object including padding, but not including margin, border, or scroll bar.

clientLeft

Retrieves the distance between the offsetLeft property and the true left side of the client area.

clientTop

Retrieves the distance between the offsetTop property and the true top of the client area.

clientWidth

Retrieves the width of the object including padding, but not including margin, border, or scroll bar.

color

Sets or retrieves the color to be used by the object.

cols

Sets or retrieves the number of columns in the table.

cols (TextArea element)

Sets or retrieves the width of the object.

colSpan

Sets or retrieves the number columns in the table that the object should span.

compatible

Retrieves the collection of user agents and versions declared in the X-UA-Compatible meta tag.

compatMode

Gets a value that indicates whether standards-compliant mode is switched on for the object.

complete

Retrieves whether the object is fully loaded.

content

Gets or sets meta-information to associate with httpEquiv or name.

contentDocument

Retrieves the document object of the page or frame.

contentEditable

Sets or retrieves the string that indicates whether the user can edit the content of the object.

contentWindow

Retrieves the window object of the specified frame or iframe.

controlRange

A collection of elements returned by the createControlRange or createRange method.

cookie

Sets or gets the string value of a cookie.

coords

Sets or retrieves the coordinates of the object.

Count

Retrieves the number of available block format tags.

customError

Returns whether the input field has raised a custom error.

data

Sets or retrieves the URL that references the data of the object.

data (TextNode)

Sets or gets the value of a TextNode object.

dataFld

Sets or retrieves a field of a given data source, as specified by the dataSrc property, to bind to the specified object.

dataFormatAs

Sets or retrieves the rendering format for the data supplied to the object.

dataPageSize

Sets or retrieves the number of records displayed in a table bound to a data source.

dataSrc

Sets or retrieves the source of the data for data binding.

dateTime

Sets or retrieves the date and time of a modification to the object.

defaultCharset

Gets the default character set from the current regional language settings.

defaultChecked

Sets or retrieves the state of the check box or radio button.

defaultSelected

Sets or retrieves the status of an option.

defaultValue

Sets or retrieves the initial contents of the object.

defaultView

Gets a reference to the window object for the document.

defer

Sets or retrieves the status of the script.

designMode

Sets or gets a value that indicates whether the document can be edited.

dir

Sets or retrieves the reading order of the object.

dir (Document object)

Sets or retrieves a value that indicates the reading order of the object.

disabled

Sets or retrieves a value that indicates whether the user can interact with the object.

disabled

Sets or gets the value that indicates whether the user can interact with the object.

doctype

Gets an object that represents the document type declaration that is associated with the current document.

documentElement

Gets a reference to the root node of the document.

documentMode

Retrieves the document compatibility mode of the document.

domain

Sets or gets the security domain of the document.

draggable

Sets or gets whether an element can be dragged on a document.

dropEffect

Sets or gets the type of drag-and-drop operation and the type of cursor to display.

effectAllowed

Sets or gets which data transfer operations are allowed for the object on the source element.

elements

Retrieves a collection, in source order, of all controls in a given form. input type=image objects are excluded from the collection.

encoding

Sets or retrieves the MIME encoding for the form.

enctype

Sets or retrieves the encoding type for the form.

fgColor

Sets or gets the foreground (text) color of the document.

FieldDelim

Specifies the character used to mark the end of data fields.

fileCreatedDate

Retrieves the date the file was created.

fileModifiedDate

Retrieves the date the file was last modified.

files

Returns a FileList object on a file type input object.

fileSize

Note   fileSize is no longer supported. Starting with IE11, use XMLHttpRequest to get the resource. For info, see Compatibility changes.

Retrieves the file size.

fileUpdatedDate

Retrieves the date the file was last updated.

focusNode

Retrieves the element or node that contains the end of a selection.

focusOffset

Retrieves the end position of a selection that is relative to the focusNode.

form

Retrieves a reference to the form that the object is embedded in.

formAction

Overrides the action attribute (where the data on a form is sent) on the parent form element.

formEnctype

Used to override the encoding (formEnctype attribute) specified on the form element.

formMethod

Overrides the submit method attribute previously specified on a form element.

formNoValidate

Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation.

forms

Retrieves a collection, in source order, of all form objects in the document.

formTarget

Overrides the target attribute on a form element.

frameElement

Retrieves the frame or iframe object that is hosting the window in the parent document.

frameSpacing

Sets or retrieves the amount of additional space between the frames.

head

Gets the head element of the document.

headers

Sets or retrieves a list of header cells that provide information for the object.

height

Sets or retrieves the height of the object.

hidden

Sets or retrieves the value indicating whether the embedded object is invisible.

hideFocus

Sets or gets the value that indicates whether the object visibly shows that it has focus.

href

Sets or retrieves a destination URL or an anchor point.

href

Gets or sets the baseline URL on which relative links are based.

hreflang

Sets or retrieves the language code of the object.

htmlFor

Sets or retrieves the object to which the given label object is assigned.

htmlFor

Sets or retrieves the object that is bound to the event script.

httpEquiv

Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.

id

Sets or retrieves the string identifying the object.

images

Retrieves a collection, in source order, of img objects in the document.

implementation

Gets the implementation object of the current document.

indeterminate

Sets or retrieves whether the user has changed the status of a input type=checkbox element. On a HTMLProgressElement element will show activity but not a specific amount.

index

Sets or retrieves the ordinal position of an option in a list box.

innerHTML

Sets or retrieves the HTML between the start and end tags of the object.

innerText

Sets or retrieves the text between the start and end tags of the object.

isCollapsed

Retrieves whether a selection is collapsed or empty.

isContentEditable

Gets the value that indicates whether the user can edit the contents of the object.

isDisabled

Gets the value that indicates whether the user can interact with the object.

isMap

Sets or retrieves whether the image is a server-side image map.

isMultiLine

Retrieves the value indicating whether the content of the object contains one or more lines.

label

Sets or retrieves the label for the option group.

label

Sets or retrieves a value that you can use to implement your own label functionality for the object.

lang

Sets or retrieves the language to use.

lastModified

Gets the date that the document was last modified, if the document supplies one.

leftMargin

Sets or gets the left margin for the entire body of the document, which overrides the default margin.

length

Gets the number of characters in a TextNode object.

length

Sets or retrieves the number of objects in a collection.

linkColor

Sets or gets the color of the document links.

links

Retrieves a collection of all a objects that specify the href property and all area objects in the document.

list

Specifies the ID of a pre-defined datalist of options for an input element.

longDesc

Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.

max (HTMLInputElement)

Defines the maximum acceptable value for an input element with type="number".

max (HTMLProgressElement)

Defines the maximum, or "done" value for a progress element.

maxConnectionsPerServer

Retrieves the maximum number of concurrent connections to a Web server.

maxLength

Sets or retrieves the maximum number of characters that the user can enter in a text control.

method

Sets or retrieves how to send the form data to the server.

Methods

Sets or gets the list of HTTP methods supported by the object.

min

Defines the minimum acceptable value for an input element with type="number".

x-ms-AcceleratorKey

Provides a way to declare that an accelerator key has been assigned to an element.

msCapsLockWarningOff

Turns automatic caps lock warning on or off for validated password input fields.

multiple

When used with the type="file" attribute, allows multiple files to be selected in the file selection dialog.

multiple

Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.

name

Sets or retrieves the name of the object.

name

Sets or retrieves a value that indicates the window name.

name (Frames)

Sets or retrieves the frame name.

name (Meta object)

Sets or retrieves the value specified in the content attribute of the meta object.

name (ParamElement)

Sets or retrieves the name of an input parameter for an element.

naturalHeight

The original height of the image resource before sizing.

naturalWidth

The original width of the image resource before sizing.

noHref

Sets or gets whether clicks in this region cause action.

noResize

Sets or retrieves whether the user can resize the frame.

noValidate

Designates a form that is not validated when submitted.

object

Retrieves the contained object.

offscreenBuffering

Sets or retrieves whether objects are drawn offscreen before being made visible to the user.

offsetHeight

Retrieves the height of the object relative to the layout or coordinate parent, as specified by the offsetParent property.

offsetLeft

Retrieves the calculated left position of the object relative to the layout or coordinate parent, as specified by the offsetParent property.

offsetParent

Retrieves a reference to the container object that defines the offsetTop and offsetLeft properties of the object.

offsetTop

Retrieves the calculated top position of the object relative to the layout or coordinate parent, as specified by the offsetParent property.

offsetWidth

Retrieves the width of the object relative to the layout or coordinate parent, as specified by the offsetParent property.

onLine

Retrieves a value indicating whether the system is online.

options

Retrieves a collection of the option objects in a select object.

options (HTMLDataListElement)

A collection of option objects that represent possible selections for a datalist element.

outerHTML

Sets or retrieves the object and its content in HTML.

outerText

Sets or retrieves the text of the object.

palette

Retrieves the palette used for the embedded document.

parentWindow

Gets a reference to the container object of the window.

pathname

Sets or retrieves the file name or path specified by the object.

pattern

Gets or sets a string containing a regular expression that the user's input must match.

patternMismatch

Returns whether the input field value does not match the rules defined by the pattern attribute.

placeholder

Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.

pluginspage

Retrieves the URL of the plug-in used to view an embedded document.

position

Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).

rangeCount

Returns the number of ranges in a selection

rangeOverflow

Returns whether a value is greater than the max attribute on an input control.

rangeUnderflow

A value is less than the min attribute on an input control.

readyState

Retrieves the current state of the object.

readyState (Link, Img, Input, Style...elements)

Retrieves a value that indicates the current state of the object.

readyState (Object element)

Retrieves the current state of the object.

referrer

Gets the URL of the location that referred the user to the current document.

rel

Sets or retrieves the relationship between the object and the destination of the link.

required

When present, marks an element that can't be submitted without a value.

rightMargin

Sets or gets the right margin for the entire body of the document.

role

Sets or retrieves the role for this element.

rowIndex

Retrieves the position of the object in the rows collection for the table.

rows

Retrieves a collection of tr (table row) objects from a table object.

rows

Sets or retrieves the number of horizontal rows contained in the object.

rowSpan

Sets or retrieves how many rows in a table the cell should span.

sandbox

Enables security restrictions for iframe elements that contain potentially untrusted content.

screenLeft

Retrieves the x-coordinate of the upper left-hand corner of the window frame, relative to the upper left-hand corner of the screen.

screenTop

Retrieves the y-coordinate of the top corner of the client area, relative to the top corner of the screen.

scripts

Retrieves a collection of all script objects in the document.

scroll

Sets or gets a value that indicates whether the scroll bars are turned on or off.

scrollHeight

Retrieves the scrolling height of the object.

scrollLeft

Sets or retrieves the distance between the left edge of the object and the leftmost portion of the content currently visible in the window.

scrollTop

Sets or retrieves the distance between the top of the object and the topmost portion of the content currently visible in the window.

scrollWidth

Retrieves the scrolling width of the object.

sectionRowIndex

Retrieves the position of the object in the tBody, tHead, tFoot, or rows collection.

selected

Sets or retrieves whether the option in the list box is the default item.

selectedIndex

Sets or retrieves the index of the selected option in a select object.

selectionEnd

Gets or sets the end position or offset of a text selection.

selectionStart

Gets or sets the starting position or offset of a text selection.

self

Retrieves a reference to the current window or frame.

shape

Sets or retrieves the shape of the object.

sourceIndex

Retrieves the ordinal position of the object, in source order, as the object appears in the document's all collection.

span

Sets or retrieves the number of columns in the group.

specified

Gets a value that indicates whether an attribute is explicitly given a value.

spellcheck

Specifies whether spell checking is applied to an editable text field.

src (bgSound)

Sets or gets the URL of a sound to play.

src (iframe, embed, xml)

Sets or retrieves a URL to be loaded by the object.

src (input, img)

Sets or retrieves a URL to be loaded by the object.

src (script)

Retrieves the URL to an external file that contains the source code or data.

start

Sets or retrieves when a video clip file should begin playing.

step

Defines an increment or jump between values that you want to allow the user to enter.

stepMismatch

Returns whether the input field value does not fit the rules given by the step attribute.

style

Sets an inline style for the element.

tabIndex

Sets or retrieves the index that defines the tab order for the object.

tabStop

Sets or retrieves whether an element behavior can receive focus and participate in the tabbing sequence.

tagName

Retrieves the tag name of the object.

target

Sets or retrieves the window or frame at which to target content.

tBodies

Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.

text

Retrieves or sets the text of the object as a string.

text (anchor element)

Sets or retrieves the text content of an HTMLAnchorElement.

text (Option element)

Sets or retrieves the text string specified by the option tag.

tFoot

Retrieves the tFoot object of the table.

tHead

Retrieves the tHead object of the table.

title

Sets or retrieves advisory information (a ToolTip) for the object.

tooLong

Returns whether an input field's value is longer than is allowed by the maxlength attribute.

top

Retrieves the topmost ancestor window.

topMargin

Sets or gets the margin for the top of the document.

type (a, link, embed)

Sets or retrieves the MIME type of the object.

type (Button element)

Gets the classification and default behavior of the button.

type (input element)

Retrieves or initially sets the type of input control represented by the object.

type (param element)

Sets or retrieves the content type of the resource designated by the value attribute.

type (Script element)

Sets or retrieves the MIME type for the associated scripting engine.

type (select element)

Retrieves the type of select control based on the value of the MULTIPLE attribute.

type (textArea element)

Retrieves the type of control.

typeMismatch

Returns whether the input field value is not the correct syntax.

uniqueID

Retrieves an autogenerated, unique identifier for the object.

uniqueNumber

Retrieves the element's unique number.

units

Sets or retrieves the height and width units of the embed object.

url

Sets or retrieves the URL property that will be loaded after the specified time has elapsed.

URL

Sets or gets the URL for the current document.

URLUnencoded

Gets the URL for the document, stripped of any character encoding.

urn

Sets or gets a Uniform Resource Name (URN) for a target document.

userAgent

Retrieves the User Agent.

valid

Returns whether the input field value has any validity errors.

validationMessage

Returns the error message that would be displayed if the user submits the form, or an empty string if no error message.

validity

Returns a ValidityState object that represents the validity states of an element.

vAlign (Table caption)

Sets or retrieves whether the caption appears at the top or bottom of the table.

value

Gets or sets the value of the object.

value (Button element)

Sets or retrieves the default or selected value of the control.

value (HTMLProgressElement)

Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.

value (Input elements)

Sets or retrieves the displayed value for the control object. This value is returned to the server when the control object is submitted.

value (Input type=file)

Retrieves the file name of the input object after the text is set by user input.

value (Param element)

Sets or retrieves the value of an input parameter for an element.

value (Select, Option element)

Sets or retrieves the value which is returned to the server when the form control is submitted.

value (TextArea element)

Retrieves or sets the text in the entry field of the textArea element.

valueAsNumber

Returns the input field value as a number.

valueMissing

Returns whether a value has not been entered in an input field that is required.

vcard_name

Sets or retrieves the vCard value of the object to use for the AutoComplete box.

version

Retrieves the version vector as a string.

viewLink

Sets or retrieves the document object that supplies content to the master element.

viewMasterTab

This property is not supported for Windows Store apps using JavaScript.

vlinkColor

Sets or gets the color of the links that the user has visited.

volume

Sets or gets the volume setting for the sound.

width

Sets or retrieves the width of the object.

width

Gets or sets the width of the object.

willValidate

Returns whether an element will successfully validate based on forms validation rules and constraints.

winControl

Gets the Windows Library for JavaScript control hosted by this element.

wrap

Sets or retrieves how to handle wordwrapping in the object.

x-ms-format-detection

Determines whether data formats within content are automatically detected and (if found) converted to clickable links.

 

 

 

Show:
© 2014 Microsoft