<input> - submit

HTML DOM Submit object

Submit object

The Submit object represents a submit button in an HTML form.

Each time the <input type="submit"> tag appears in an HTML form, a Submit object is created.

Before the form is submitted, the onclick event handler is fired, and a handler can cancel the form submission by returning fasle.

You can access a submit button by iterating over the form's elements[] array, or by using document.getElementById().

Submit object attributes

W3C: W3C standard.

disabledWhether the Submit button should be disabled.Yes
formReturns a reference to the form that contains this submit button.Yes
nameSets or returns the name of the submit button.Yes
typeReturns the form element type of the submit button.Yes
valueSets or returns the text that appears on the submit button.Yes

Standard Properties and Events

The Submit object also supports standard properties and events .