Main Index |
Top Of Tree |
Tag Index |
Tag History
- What is it?
- BUTTON is a TYPE attribute value to the INPUT tag for FORMs.
It places a button on an HTML form and uses JavaScript code to
make the button perform an action you define (this is aside from
the information that it sends in the Name/Value pair upon form
submittal.) Note that this INPUT type does not actually initiate
a form submission.
- Attributes
- Name
- 2
| 3 | 3.2
| IE3B1 | M
| N1
- Required? Yes
- Description:
This is a required attribute that associates a symbolic name to the
field for submittal to the form processing script.
- Values: Alphanumeric characters.
- Type
- 2
| 3 | 3.2
| IE3B1 | M
| N1
- Required? Yes*
- Description:
* This is the required TYPE attribute for
this INPUT mechanism. From the strict view, the TYPE attribute
is not required.
- Values: BUTTON
- Value
- 2
| 3 | 3.2
| IE3B1 | M
| N1
- Required? Yes
- Description:
This is a required attribute representing the symbolic result of
the button field when activated that is passed to the form
processing script. It is also used to indicate a label to be displayed
on the face of the button.
- Values: Alphanumeric characters.
Event Handler Attributes
- [For more information on Event Handlers, please see the
SCRIPT page.]
- onClick
- 2
| 3 | 3.2
| IE3B1 | M
| N2B3
- Required? No
- Description:
A click Event Handler executes Script code when an object on a form
is clicked.
- Values: Script statements or an
external function call.
Style Sheet Attributes
[More on Cascading Style Sheets]
- Class
- 2 | 3
| 3.2 | IE3B1
| M | N4B2
- Required? No
- Description:
This represents an assigned semantic classification grouping(s) for the
current tag.
- Values:
Given as a comma separated list of alphanumeric characters. Class names
may contain spaces (multiple consecutive spaces treated as a single
space.)
- ID
- 2 | 3
| 3.2 | IE3B1
| M | N4B2
- Required? No
- Description:
This assigns an alpha-numeric identifier that is unique
to this tag instance. Style sheets may use this attribute to reference
the current instance of this tag. Hyperlinks may also use this identifier
to serve as a destination.
- Values:
An alphanumeric string - initial character must be a letter followed
by alphabetic characters, digits, "-" or "."
characters. The allowable set of alpha-characters is restricted to the
A-Z and a-z set.
- Style
- 2 | 3
| 3.2 | IE3B1
| M | N4B3
- Required? No
- Description:
This attribute is a text string that provides rendering style
information for the current tag.
- Values:
Please see the description of
inline styles for more
information on how to use this attribute and its
possible values.
- Example
- <form>
<input TYPE="button" VALUE="Press Me"
NAME="foo"
onClick="test1(this.form)">
</form>
- Parent Model
- <form>
- Content Model
- This tag accepts no content.
Tips & Tricks
Browser Peculiarities
- This tag seems to have slipped under the radar of most all
other the references I have seen, so finding info for it was
difficult at best. I was surprised to find that Netscape has
supported this tag since version 1.0. I am not sure what purpose
it served in that era because its main focus is now related to
scripting (not supported until Navigator 2.0) I am still looking
for more info regarding this tag.
- I made the VALUE a required element because neither browser
has a default button label (unlike submit and reset) - this makes
the button blank or almost non-existant if no VALUE is present.
Boring Copyright Stuff...