|
|
Form elements
- FORM - Form
- Allows the creation of forms using specialized form elements.
- Attributes:
- ACTION
- Points to the location of the script which
will be activated by the form.
- METHOD
- Describes the method by which the data from the form is passed to the
script. Valid methods are GET and POST.
- Within: BODY
- Contains: text, INPUT,
SELECT,
TEXTAREA
- Examples:
<FORM METHOD="POST" ACTION="http://www.eng.hawaii.edu/cgi-bin/post-query">
Type your name: <INPUT NAME="name" TYPE="text" VALUE="John Doe"><br>
Check this if you think this is fun: <INPUT NAME="check" TYPE="checkbox">&
lt;br>
Are you going to make your own form?
<INPUT TYPE="radio" NAME="rad" VALUE="Yes"> Yes
<INPUT TYPE="radio" NAME="rad" VALUE="No"> No
<INPUT TYPE="radio" NAME="rad" CHECKED VALUE="Maybe"> Maybe <br>
<INPUT TYPE="image" NAME="globe" SRC="smallplanet.gif">
<SELECT NAME="sel1" SIZE=1>
<OPTION SELECTED VALUE="0">Zero
<OPTION VALUE="1">One
<OPTION VALUE="2">Two
<OPTION VALUE="3">Three
</SELECT>
<SELECT NAME="sel2" MULTIPLE SIZE=4>
<OPTION>Alpha
<OPTION>Beta
<OPTION>Gamma
<OPTION SELECTED>Delta
<OPTION>Epsilon
<OPTION>Zeta
</SELECT><BR>
<INPUT TYPE="submit" VALUE="Click here to submit">
<INPUT TYPE="reset" VALUE="Click here to reset form">
</FORM>
- INPUT - Form input field.
- Creates a wide variety of form input types. These tags do not usually
require a closing tag.
- Attributes:
- TYPE
- Valid values: TEXT PASSWORD CHECKBOX
RADIO IMAGE HIDDEN SUBMIT
RESET
- NAME
- Sets the name of the field. (If the field type is IMAGE, the
coordinates of the location clicked are returned as
name.x and
name.y.)
- MAXLENGTH
- For the applicable types, sets a maximum field width/length.
- SIZE
- For nter multi-line sections of text.
- Attributes:
- COLS
- Sets the number of columns visible in the text area.
- NAME
- Sets the name of the field.
- ROWS
- Sets the number of rows visible in the text area.
|