class FormElement
package js.html
extends Element › DOMElement › Node › EventTarget
Available on js
The HTMLFormElement
interface represents a form
element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements.
Documentation HTMLFormElement by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See also:
Variables
acceptCharset:String
A DOMString
reflecting the value of the form's accept-charset
HTML attribute, representing the character encoding that the server accepts.
action:String
A DOMString
reflecting the value of the form's action
HTML attribute, containing the URI of a program that processes the information submitted by the form.
autocomplete:String
A DOMString
reflecting the value of the form's autocomplete
HTML attribute, indicating whether the controls in this form can have their values automatically populated by the browser.
read onlyelements:HTMLCollection
A HTMLFormControlsCollection
holding all form controls belonging to this form element.
encoding:String
A DOMString
reflecting the value of the form's enctype
HTML attribute, indicating the type of content that is used to transmit the form to the server. Only specified values can be set. The two properties are synonyms.
enctype:String
A DOMString
reflecting the value of the form's enctype
HTML attribute, indicating the type of content that is used to transmit the form to the server. Only specified values can be set. The two properties are synonyms.
method:String
A DOMString
reflecting the value of the form's method
HTML attribute, indicating the HTTP method used to submit the form. Only specified values can be set.
name:String
A DOMString
reflecting the value of the form's name
HTML attribute, containing the name of the form.
noValidate:Bool
A Boolean
reflecting the value of the form's novalidate
HTML attribute, indicating whether the form should not be validated.
Methods
checkValidity():Bool
Returns true
if the element's child controls are subject to constraint validation and satisfy those contraints; returns false
if some controls do not satisfy their constraints. Fires an event named invalid
at any control that does not satisfy its constraints; such controls are considered invalid if the event is not canceled. It is up to the programmer to decide how to respond to false
.