JavaScripture
Contribute via GitHub Feedback

HTMLFormElement : HTMLElement

Forms contain HTMLInputElements and send the user input to the server. See also FormData.

Instance Indexers

this[index : Number] : Element

Returns the input element at index in the form.

Example:

Run

Results:

 

this[name : String] : Object

Returns the element in the form with the specified name. The returned value will be of the type HTMLInputElement, HTMLImageElement, or NodeList. NodeList is returned if name used on radio input elements.

Example:

Run

Results:

 

Instance Properties

acceptCharset : String

action : String

autocomplete : String

elements : HTMLFormControlsCollection  

encoding : String

enctype : String

length : Number  

method : String

name : String

noValidate : Boolean

target : String

Instance Methods

checkValidity() : Boolean

reset() : undefined

submit() : undefined

Instance Events

onsubmit / 'submit'  
listener() : Boolean

Called before the form is submitted to the server. Return false to stop the form from being submitted.