jim.shamlin.com

Submit Button

A button that, when clicked, submits the data according to the attributes of the form.


Basics

Bare-bones code for a button is:

<INPUT TYPE="submit" VALUE="Label">

This renders the button only with the VALUE appearing as text on the button. It's possible to omit the VALUE, but the button may not display at all if this is done.


Usage

A submit button is necessary to submit the form, unless there is a JavaScript command that submits the form in response to another screen event.


Processing

Implementation among Web browsers varies. Some will sent a name=value pair indicating the NAME and VALUE of the button that was clicked. Others will not send anything at all.


HTML Attributes

A submit button typically has only name and value (and the name is often omitted), but may also have the following:

Worth noting: the text supplied as the VALUE will be displayed on the button, and may be text only (not HTML code to format it)


JavaScript

Properties

A submit button has no unique or unusual JavaScript properties.

Methods

Event Handlers


Misc Notes

A submit button is useful for a bare-bones method to submit the form. If there are commands to be executed before submitting, a better approach would be to code a generic button that will execute the commands and submit the form programatically.