HTML DOM Input Submit Object
- Previous page <input> search
- Next page <input> text
Input Submit object
The Input Submit object represents the HTML <input> element with type="submit".
Access Input Submit object
You can use getElementById() to access the <input> element with type="submit":
var x = document.getElementById("mySubmit");
Tip:You can also search the form for elements collection to access <input type="submit">.
Create Input Submit object
You can use the document.createElement() method to create an <input> element with type="submit":
var x = document.createElement("INPUT"); x.setAttribute("type", "submit");
Input Submit object properties
Properties | Description |
---|---|
autofocus | Set or return whether the submit button should automatically focus when the page is loaded. |
defaultValue | Set or return the default value of the submit button. |
disabled | Set or return whether the submit button should be disabled. |
form | Return a reference to the form that contains the submit button. |
formAction | Set or return the value of the formaction attribute of the submit button. |
formEnctype | Set or return the value of the formenctype attribute of the submit button. |
formMethod | Set or return the value of the formmethod attribute of the submit button. |
formNoValidate | Set or return whether form data should be validated when submitting. |
formTarget | Set or return the value of the formtarget attribute of the submit button. |
name | Set or return the value of the name attribute of the submit button. |
type | What type of form element is the submit button. |
value | Sets or returns the value attribute value of the submit button. |
Standard attributes and events
Input Submit object supports standardsPropertiesandEvents.
Related pages
HTML tutorial:HTML form
HTML reference manual:HTML <input> tag
HTML reference manual:HTML <input> type attribute
- Previous page <input> search
- Next page <input> text