Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML DOM Submit object


May 06, 2021 JavaScript with HTML DOM Reference book


Table of contents


HTML DOM Submit object


The Submit object

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

In HTML forms, every time a label appears, a Submit object is created.

The onclick event handle is triggered before the form is submitted, and a handle cancels the form submission by returning fasle.

You can access a submission button by traversing the form's array of elements, or by using document.getElementById().


Submit object properties

W3C: W3C standard.

Attributes describe W3C
disabled Set or return to the submit button should be disabled. Yes
form Returns a reference to a form that contains this submission button. Yes
name Set or return the name of the submit button. Yes
type Returns the type element type of the submit button. Yes
value Set or return the text displayed on the submit button. Yes

Standard properties and events

The Submit object also supports the standard properties and events.