HTMLInputElement interface provides special properties and methods for manipulating the options, layout, and presentation of <input> elements.string: Returns / Sets the element's accept attribute, containing comma-separated list of file types accepted by the server when type is file.
Promise<string>string: Returns / Sets the element's alt attribute, containing alternative text to use when type is image.
Promise<string>string: Returns / Sets the element's autocomplete attribute, indicating whether the value of the control can be automatically completed by the browser.
Ignored if the value of the type attribute is hidden, checkbox, radio, file, or a button type (button, submit, reset, image).
on: the browser can autocomplete the value using previously stored valueoff: the user must explicity enter a valuePromise<string>boolean:Returns / Sets the element's autofocus attribute, which specifies that a form control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. Only one form element in a document can have the autofocus attribute. It cannot be applied if the type attribute is set to hidden (that is, you cannot automatically set focus to a hidden control).
Promise<boolean>boolean:Returns / Sets the current state of the element when type is checkbox or radio.
Promise<boolean>boolean:Returns / Sets the default state of a radio button or checkbox as originally specified in HTML that created this object.
Promise<boolean>string:Returns / Sets the default value as originally specified in the HTML that created this object.
Promise<string>string:Returns / Sets the directionality of the element.
Promise<string>boolean:Returns / Sets the element's disabled attribute, indicating that the control is not available for interaction. The input values will not be submitted with the form. See also readonly
Promise<boolean>FileList array:Returns the list of selected files.
FileListHTMLFormElement object:Returns a reference to the parent <form> element.
HTMLFormElementstring: Returns / Sets the element's formaction attribute, containing the URI of a program that processes information submitted by the element. This overrides the action attribute of the parent form.
Promise<string>string:Returns / Sets the element's formenctype attribute, containing the type of content that is used to submit the form to the server. This overrides the enctype attribute of the parent form.
Promise<string>string:Returns / Sets the element's formmethod attribute, containing the HTTP method that the browser uses to submit the form. This overrides the method attribute of the parent form.
Promise<string>boolean:Returns / Sets the element's formnovalidate attribute, indicating that the form is not to be validated when it is submitted. This overrides the novalidate attribute of the parent form.
Promise<boolean>string:Returns / Sets the element's formtarget attribute, containing a name or keyword indicating where to display the response that is received after submitting the form. This overrides the target attribute of the parent form.
Promise<string>string: Returns / Sets the element's height attribute, which defines the height of the image displayed for the button, if the value of type is image.
Promise<number>boolean:Returns whether the checkbox or radio button is in indeterminate state. For checkboxes, the effect is that the appearance of the checkbox is obscured/greyed in some way as to indicate its state is indeterminate (not checked but not unchecked). Does not affect the value of the checked attribute, and clicking the checkbox will set the value to false.
Promise<boolean>Provides a hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents.
Promise<string>NodeList array:Returns a list of <label> elements that are labels for this element.
SuperNodeListHTMLElement object:Returns the element pointed by the list attribute. The property may be null if no HTML element found in the same tree.
SuperHTMLElementstring:Returns / Sets the element's max attribute, containing the maximum (numeric or date-time) value for this item, which must not be less than its minimum (min attribute) value.
Promise<string>long:Returns / Sets the element's maxlength attribute, containing the maximum number of characters (in Unicode code points) that the value can have. (If you set this to a negative number, an exception will be thrown.)
Promise<number>string:Returns / Sets the element's min attribute, containing the minimum (numeric or date-time) value for this item, which must not be greater than its maximum (max attribute) value.
Promise<string>long:Returns / Sets the element's minlength attribute, containing the minimum number of characters (in Unicode code points) that the value can have. (If you set this to a negative number, an exception will be thrown.)
Promise<number>boolean:Returns / Sets the element's multiple attribute, indicating whether more than one value is possible (e.g., multiple files).
Promise<boolean>string:Returns / Sets the element's name attribute, containing a name that identifies the element when submitting the form.
Promise<string>string:Returns / Sets the element's pattern attribute, containing a regular expression that the control's value is checked against. Use the title attribute to describe the pattern to help the user.
This attribute only applies when the value of the type attribute is text, search, tel, url or email.
Promise<string>string: Returns / Sets the element's placeholder attribute, containing a hint to the user of what can be entered in the control. The placeholder text must not contain carriage returns or line-feeds.
This attribute only applies when the value of the type attribute is text, search, tel, url or email.
Promise<string>boolean: Returns / Sets the element's readonly attribute, indicating that the user cannot modify the value of the control.
HTML5.
This attribute is ignored if the value of the type attribute is hidden, range, color, checkbox, radio, file, or a button type.
Promise<boolean>boolean:Returns / Sets the element's required attribute, indicating that the user must fill in a value before submitting a form.
Promise<boolean>string:Returns / Sets the direction in which selection occurred.
forward if selection was performed in the start-to-end direction of the current localebackward for the opposite directionnone if the direction is unknownPromise<string>unsigned long:Returns / Sets the end index of the selected text. When there's no selection, this returns the offset of the character immediately following the current text input cursor position.
Promise<number>unsigned long:Returns / Sets the beginning index of the selected text. When nothing is selected, this returns the position of the text input cursor (caret) inside of the <input> element.
Promise<number>unsigned long:Returns / Sets the element's size attribute, which contains the visual size of the control. This value is in pixels unless the value of type is text or password, in which case, it is an integer number of characters.
This attribute only applies when type is set to text, search, tel, url, email, or password.
Promise<number>string:Returns / Sets the element's src attribute, which specifies a URI for the location of an image to display on the graphical submit button, if the value of type is image; otherwise it is ignored.
Promise<string>string:Returns / Sets the element's step attribute, which works withmin and max to limit the increments at which a numeric or date-time value can be set. It can be the string any or a positive floating point number. If this is not set to any, the control accepts only values at multiples of the step value greater than the minimum.
Promise<string>string: Returns / Sets the element's type attribute, indicating the type of control to display. See type attribute of <input> for possible values.
Promise<string>string:Returns a localized message that describes the validation constraints that the control does not satisfy (if any). This is the empty string if the control is not a candidate for constraint validation (willvalidate is false), or it satisfies its constraints. This value can be set by the setCustomValidity method.
Promise<string>ValidityState object:Returns the element's current validity state.
Promise<ValidityState>string:Returns / Sets the current value of the control.
<p class="note"><strong>Note:</strong> If the user enters a value different from the value expected, this may return an empty string.</p>Promise<string>Date object:Returns / Sets the value of the element, interpreted as a date, or null if conversion is not possible.
Promise<any>double:Returns the value of the element, interpreted as one of the following, in order:
<ul>
<li>A time value</li>
<li>A number</li>
<li><code>NaN</code> if conversion is impossible</li>
</ul>Promise<number>string:Returns / Sets the document's width attribute, which defines the width of the image displayed for the button, if the value of type is image.
Promise<number>`boolean`:Returns whether the element is a candidate for constraint validation.
It is false if any conditions bar it from constraint validation, including: its type is hidden, reset, or button; it has a datalist ancestor; or its disabled property is true.
Promise<boolean>Is a string representing the access key assigned to the element.
Promise<string>Needs content.
Promise<string>Is a string, reflecting the dir global attribute, representing the directionality of the element. Possible values are "ltr", "rtl", and "auto".
Promise<string>Is a boolean indicating if the element can be dragged.
Promise<boolean>Is a boolean indicating if the element is hidden or not.
Promise<boolean>Is a boolean indicating whether the user agent must act as though the given node is absent for the purposes of user interaction events, in-page text searches ("find in page"), and text selection.
Promise<boolean>Represents the "rendered" text content of a node and its descendants. As a getter, it approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied it to the clipboard.
Promise<string>Is a string representing the language of an element's attributes, text, and element contents.
Promise<string>Returns a double containing the height of an element, relative to the layout.
Promise<number>Returns a double, the distance from this element's left border to its offsetParent's left border.
Promise<number>Returns a Element that is the element from which all offset calculations are currently computed.
SuperElementReturns a double, the distance from this element's top border to its offsetParent's top border.
Promise<number>Returns a double containing the width of an element, relative to the layout.
Promise<number>Is a boolean that controls spell-checking. It is present on all HTML elements, though it doesn't have an effect on all of them.
Promise<boolean>Is a string containing the text that appears in a popup box when mouse is over the element.
Promise<string>Is a boolean representing the translation.
Promise<boolean>Returns a NamedNodeMap object containing the assigned attributes of the corresponding HTML element.
NamedNodeMapReturns a DOMTokenList containing the list of class attributes.
DOMTokenListIs a string representing the class of the element.
Promise<string>Returns a number representing the inner height of the element.
Promise<number>Returns a number representing the width of the left border of the element.
Promise<number>Returns a number representing the width of the top border of the element.
Promise<number>Returns a number representing the inner width of the element.
Promise<number>Is a string representing the id of the element.
Promise<string>Is a string representing the markup of the element's content.
Promise<string>A string representing the local part of the qualified name of the element.
Promise<string>The namespace URI of the element, or null if it is no namespace.
Note: In Firefox 3.5 and earlier, HTML elements are in no namespace. In later versions, HTML elements are in the http://www.w3.org/1999/xhtml namespace in both HTML and XML trees.
Promise<string>Is a string representing the markup of the element including its content. When used as a setter, replaces the element with nodes parsed from the given string.
Promise<string>Represents the part identifier(s) of the element (i.e. set using the part attribute), returned as a DOMTokenList.
DOMTokenListA string representing the namespace prefix of the element, or null if no prefix is specified.
Promise<string>Returns a number representing the scroll view height of an element.
Promise<number>Is a number representing the left scroll offset of the element.
Promise<number>A number representing number of pixels the top of the document is scrolled vertically.
Promise<number>Returns a number representing the scroll view width of the element.
Promise<number>Returns the open shadow root that is hosted by the element, or null if no open shadow root is present.
ShadowRootReturns the name of the shadow DOM slot the element is inserted in.
Promise<string>Returns a String with the name of the tag for the given element.
Promise<string>Returns a string representing the base URL of the document containing the Node.
Promise<string>Returns a live NodeList containing all the children of this node. NodeList being live means that if the children of the Node change, the NodeList object is automatically updated.
SuperNodeListReturns a Node representing the first direct child node of the node, or null if the node has no child.
SuperNodeA boolean indicating whether or not the Node is connected (directly or indirectly) to the context object, e.g. the Document object in the case of the normal DOM, or the ShadowRoot in the case of a shadow DOM.
Promise<boolean>Returns a Node representing the last direct child node of the node, or null if the node has no child.
SuperNodeReturns a Node representing the next node in the tree, or null if there isn't such node.
SuperNodeReturns a string containing the name of the Node. The structure of the name will differ with the node type. E.g. An HTMLElement will contain the name of the corresponding tag, like 'audio' for an HTMLAudioElement, a Text node will have the '#text' string, or a Document node will have the '#document' string.
Promise<string>Returns an unsigned short representing the type of the node. Possible values are:
Name Value ELEMENT_NODE1ATTRIBUTE_NODE 2TEXT_NODE3CDATA_SECTION_NODE4ENTITY_REFERENCE_NODE 5ENTITY_NODE 6PROCESSING_INSTRUCTION_NODE7COMMENT_NODE8DOCUMENT_NODE9DOCUMENT_TYPE_NODE10DOCUMENT_FRAGMENT_NODE11NOTATION_NODE 12
Promise<number>Returns / Sets the value of the current node.
Promise<string>Returns the Document that this node belongs to. If the node is itself a document, returns null.
SuperDocumentReturns an Element that is the parent of this node. If the node has no parent, or if that parent is not an Element, this property returns null.
SuperElementReturns a Node that is the parent of this node. If there is no such node, like if this node is the top of the tree or if doesn't participate in a tree, this property returns null.
SuperNodeReturns a Node representing the previous node in the tree, or null if there isn't such node.
SuperNodeReturns / Sets the textual content of an element and all its descendants.
Promise<string>The style property is used to get as well as set the inline style of an element. When getting, it returns a CSSStyleDeclaration object that contains a list of all styles properties for that element with values assigned for the attributes that are defined in the element's inline style attribute.
CSSStyleDeclarationNeeds content.
Promise<string>Needs content.
Promise<boolean>Needs content.
Promise<Record<string, string>>Needs content.
Promise<string>Needs content.
Promise<number>Returns the Element immediately following this node in its parent's children list, or null if there is no Element in the list following this node.
SuperElementReturns the Element immediately prior to this node in its parent's children list, or null if there is no Element in the list prior to this node.
SuperElementReturns the number of children of this ParentNode which are elements.
Promise<number>Returns a live HTMLCollection containing all of the Element objects that are children of this ParentNode, omitting all of its non-element nodes.
SuperHTMLCollectionReturns the first node which is both a child of this ParentNodeand is also an Element, or null if there is none.
SuperElementReturns the last node which is both a child of this ParentNodeand is an Element, or null if there is none.
SuperElementReturns the <slot> the node is inserted in.
HTMLSlotElementReturns a boolean that is false if the element is a candidate for constraint validation, and it does not satisfy its constraints. In this case, it also fires an invalid event at the element. It returns true if the element is not a candidate for constraint validation, or if it satisfies its constraints. Inherited from HTMLObjectElement
Promise<boolean>Runs the checkValidity() method, and if it returns false (for an invalid input or no pattern pattern attribute provided), then it reports to the user that the input is invalid in the same manner as if you submitted a form. Inherited from HTMLFormElement
Promise<boolean>Selects all the text in the input element, and focuses it so the user can subsequently replace all of its content.
Promise<void>Replaces a range of text in the input element with new text.
string. Needs content.number. Needs content.number. Needs content.SelectionMode. Needs content.Promise<void>Selects a range of text in the input element (but does not focus it).
number. Needs content.number. Needs content.string. Needs content.Promise<void>Decrements the value by (step * n), where n defaults to 1 if not specified.
number. Needs content.Promise<void>Increments the value by (step * n), where n defaults to 1 if not specified.
number. Needs content.Promise<void>Sends a mouse click event to the element.
Promise<void>Returns the Element which is the closest ancestor of the current element (or the current element itself) which matches the selectors given in parameter.
string. selectors is a string containing a selector list.p:hover, .toto + qSuperElementRetrieves the value of the named attribute from the current node and returns it as an Object.
string. attributeName is the name of the attribute whose value you want to get.Promise<string>Returns an array of attribute names from the current element.
Promise<Iterable,string>Retrieves the node representation of the named attribute from the current node and returns it as an Attr.
string. attrName is a string containing the name of the attribute.Promise<Attr>Retrieves the node representation of the attribute with the specified name and namespace, from the current node and returns it as an Attr.
string. namespace is a string specifying the namespace of the attribute.string. nodeName is a string specifying the name of the attribute.Promise<Attr>Retrieves the value of the attribute with the specified name and namespace, from the current node and returns it as an Object.
string. The namespace in which to look for the specified attribute.string. The name of the attribute to look for.Promise<string>Returns the size of an element and its position relative to the viewport.
Promise<DOMRect>Returns a collection of rectangles that indicate the bounding rectangles for each line of text in a client.
Promise<DOMRectList>Returns a live HTMLCollection that contains all descendants of the current element that possess the list of classes given in the parameter.
string. A string containing one or more class names to match on, separated by whitespace.SuperHTMLCollectionReturns a live HTMLCollection containing all descendant elements, of a particular tag name, from the current element.
string. tagName is the qualified name to look for. The special string "*" represents all elements. For compatibility with XHTML, lower-case should be used.SuperHTMLCollectionReturns a live HTMLCollection containing all descendant elements, of a particular tag name and namespace, from the current element.
string. namespaceURI is the namespace URI of elements to look for (see Element.namespaceURI and Attr.namespaceURI). For example, if you need to look for XHTML elements, use the XHTML namespace URI, http://www.w3.org/1999/xhtml.string. localName is either the local name of elements to look for or the special value "*", which matches all elements (see Element.localName and Attr.localName).SuperHTMLCollectionReturns a boolean indicating if the element has the specified attribute or not.
string. is a string representing the name of the attribute.Promise<boolean>Returns a boolean indicating if the element has the specified attribute, in the specified namespace, or not.
string. namespace is a string specifying the namespace of the attribute.string. localName is the name of the attribute.Promise<boolean>Returns a boolean indicating if the element has one or more HTML attributes present.
Promise<boolean>Indicates whether the element on which it is invoked has pointer capture for the pointer identified by the given pointer ID.
number. The pointerId of a PointerEvent object.Promise<boolean>Returns a boolean indicating whether or not the element would be selected by the specified selector string.
string. selectorString is a string representing the selector to test.Promise<boolean>Asynchronously asks the browser to make the element full-screen.
FullscreenOptions. A FullscreenOptions object providing options that control the behavior of the transition to full-screen mode. Currently, the only option is navigationUI, which controls whether or not to show navigation UI while the element is in full-screen mode. The default value is "auto", which indicates that the browser should decide what to do.Promise<void>Allows to asynchronously ask for the pointer to be locked on the given element.
Promise<void>Scrolls the page until the element gets into the view.
boolean | ScrollIntoViewOptionsboolean value: true, the top of the element will be aligned to the top of the visible area of the scrollable ancestor. Corresponds to scrollIntoViewOptions: {block: "start", inline: "nearest"}. This is the default value.false, the bottom of the element will be aligned to the bottom of the visible area of the scrollable ancestor. Corresponds to scrollIntoViewOptions: {block: "end", inline: "nearest"}.behaviorOptionalauto or smooth. Defaults to auto.blockOptionalstart, center, end, or nearest. Defaults to start.inlineOptionalstart, center, end, or nearest. Defaults to nearest.Promise<void>Compares the position of the current node against another node in any other document.
Node. The other Node with which to compare the first node’s document position.Promise<number>Returns a boolean value indicating whether or not a node is a descendant of the calling node.
Node. Needs content.Promise<boolean>Returns the context object's root which optionally includes the shadow root if it is available.
GetRootNodeOptions. An object that sets options for getting the root node. The available options are: composed: A `boolean` that indicates whether the shadow root should be returned (false, the default), or a root node beyond shadow root (true).SuperNodeReturns a boolean indicating whether or not the element has any child nodes.
Promise<boolean>Accepts a namespace URI as an argument and returns a boolean with a value of true if the namespace is the default namespace on the given node or false if not.
string. namespaceURI is a string representing the namespace against which the element will be checked.Promise<boolean>Returns a boolean which indicates whether or not two nodes are of the same type and all their defining data points match.
Node. otherNode: The Node to compare equality with.Promise<boolean>Returns a boolean value indicating whether or not the two nodes are the same (that is, they reference the same object).
Node. otherNode The Node to test against.Promise<boolean>Accepts a prefix and returns the namespace URI associated with it on the given node if found (and null if not). Supplying null for the prefix will return the default namespace.
string. The prefix to look for. If this parameter is null, the method will return the default namespace URI, if any.Promise<string>Returns a string containing the prefix for a given namespace URI, if present, and null if not. When multiple prefixes are possible, the result is implementation-dependent.
string. Needs content.Promise<string>Clean up all the text nodes under this element (merge adjacent, remove empty).
Promise<void>Needs content.
Promise<void>Needs content.
Promise<void>Returns the first Element with the current element as root that matches the specified group of selectors.
string. A string containing one or more selectors to match against. This string must be a valid compound selector list supported by the browser; if it's not, a SyntaxError exception is thrown. See Locating DOM elements using selectors for more information about using selectors to identify elements. Multiple selectors may be specified by separating them using commas.SuperElementReturns a NodeList representing a list of elements with the current element as root that matches the specified group of selectors.
string. A string containing one or more selectors to match against. This string must be a valid CSS selector string; if it's not, a SyntaxError exception is thrown. See Locating DOM elements using selectors for more information about using selectors to identify elements. Multiple selectors may be specified by separating them using commas.SuperNodeListonfullscreenchange | onfullscreenerror |
oncopy | oncut |
onpaste | onabort |
onanimationend | onanimationiteration |
onanimationstart | onauxclick |
onblur | oncancel |
oncanplay | oncanplaythrough |
onchange | onclick |
onclose | oncontextmenu |
oncuechange | ondblclick |
ondrag | ondragend |
ondragenter | ondragleave |
ondragover | ondragstart |
ondrop | ondurationchange |
onemptied | onended |
onerror | onfocus |
onformdata | ongotpointercapture |
oninput | oninvalid |
onkeydown | onkeypress |
onkeyup | onload |
onloadeddata | onloadedmetadata |
onloadstart | onlostpointercapture |
onmousedown | onmouseenter |
onmouseleave | onmousemove |
onmouseout | onmouseover |
onmouseup | onpause |
onplay | onplaying |
onpointercancel | onpointerdown |
onpointerenter | onpointerleave |
onpointermove | onpointerout |
onpointerover | onpointerup |
onprogress | onratechange |
onreset | onresize |
onscroll | onseeked |
onseeking | onselect |
onselectionchange | onselectstart |
onstalled | onsubmit |
onsuspend | ontimeupdate |
ontouchcancel | ontouchend |
ontouchmove | ontouchstart |
ontransitionend | onvolumechange |
onwaiting | onwheel |
setCustomValidity() | attachShadow() |
computedStyleMap() | insertAdjacentElement() |
insertAdjacentHTML() | insertAdjacentText() |
releasePointerCapture() | removeAttribute() |
removeAttributeNode() | removeAttributeNS() |
scroll() | scrollBy() |
scrollTo() | setAttribute() |
setAttributeNode() | setAttributeNodeNS() |
setAttributeNS() | setPointerCapture() |
toggleAttribute() | appendChild() |
cloneNode() | insertBefore() |
removeChild() | replaceChild() |
addEventListener() | dispatchEvent() |
removeEventListener() | animate() |
getAnimations() | after() |
before() | remove() |
replaceWith() | append() |
prepend() |