Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Submit Object

HTML DOM Submit Object


The Submit object

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

In an HTML form, A Submit object is created each time the tag appears.

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

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


Submit Object Properties

W3C: W3C standard.

property Description W3C
disabled Sets or returns whether the submit button should be disabled. Yes
form Returns a reference to the form that contains this submit button. Yes
name Sets or returns the name of the submit button. Yes
type Returns the form element type of the submit button. Yes
value Sets or returns the text displayed on the submit button. Yes

Standard properties and events

The Submit object also supports standard property and Events.