9.2 XHTML—Using Forms^363
Table 9.8Common submit button attributes
Common
Attributes Values Usage
type submit Configures the submit button.
name Alphanumeric, no spaces,
begins with a letter
Names the form element so that it can be easily accessed by
client-side scripting languages (such as JavaScript) or by server-
side processing. The name should be unique.
id Alphanumeric, no spaces,
begins with a letter
Provides a unique identifier for the form element.
value Text or numeric characters Configures the text displayed on the submit button. By default,
the text “Submit Query” is displayed.
Table 9.9Common reset button attributes
Common
Attributes Values Usage
type reset Configures the reset button.
name Alphanumeric, no spaces,
begins with a letter
Names the form element so that it can be easily accessed by
client-side scripting languages (such as JavaScript) or by
server-side processing. The name should be unique.
id Alphanumeric, no spaces,
begins with a letter
Provides a unique identifier for the form element.
value Text or numeric characters Configures the text displayed on the reset button. By default,
the text “Reset” is displayed.
Reset Button.This form control is configured by the <input />tag and is used to
reset the form fields to their initial values. A sample reset button is shown in Figure
9.13.
The XHTML code follows:
<input type="reset" />
Common reset button attributes are listed in Table 9.9.
Button. This form control is configured by the <input />tag and offers a flexible
user interface. There is no default action when the button is clicked. Form information
is not sent to the Web server when this button is clicked.
Figure 9.13
The reset button
gives Web page
visitors a chance to
reset or clear their
mistakes