<FORM ACTION="mailto:sarneil@uvic.ca?subject=mail-in form"
ENCTYPE = "text/plain" METHOD="post">
|
Explanation
|
HTML code
|
|
Start the web page
|
|
|
These tags appear at the start of any web page. The form
must be in the body of the page.
|
<HTML>
<HEAD><TITLE>My
Page</TITLE></HEAD>
<BODY>
|
|
Start the form
|
|
|
I've chosen a simple action. When the user clicks the
submit button, the browser emails the information in the
form to the specified address with the subject line
provided. The ENCTYPE property tells the email program how
to decode the message it gets, rather than treat it as an
attached text file. The METHOD property tells the browser
how to send the information.
|
<FORM ACTION = "mailto:sarneil@uvic.ca?subject=mail-in
form" ENCTYPE = "text/plain" METHOD = "post">
|
|
Ask the user to type in his or her name
|
|
|
The INPUT tag creates a new form element as specified by
the properties (type, name, size etc).
|
<P>
What is your name:<BR>
<INPUT TYPE="text" NAME="name" VALUE="" SIZE=30>
|
|
Ask the user to choose from a list
|
|
|
I decided to use checkboxes. If the list were longer, I
might have used a scrolling list instead.
If I wanted the options to be mutually exclusive, I would
use either radio buttons or a popup list.
|
<P>
What kind of computer do you use: <BR>
<INPUT TYPE = "checkbox" NAME = "WhichComputer" VALUE =
"PC"> Intel-compatible <BR>
<INPUT TYPE = "checkbox" NAME = "WhichComputer" VALUE =
"Mac"> Macintosh or compatible
|
|
Include the submit button
|
|
|
When the user clicks on the submit button, it tells the
browser to do whatever is specified in the ACTION attribute
of the FORM tag.
|
<P>
<INPUT TYPE="submit" NAME="submit" VALUE="Send
information">
|
|
End the form
|
|
|
This tag ends the form.
|
</FORM>
|
|
End the web page
|
|
|
These are the tags used to end a web page.
|
</BODY>
</HTML>
|