|
|
<INPUT ...>NAME NAME
| this code | produces this |
<FORM ACTION="../cgi-bin/mycgi.pl"> favorite color: <INPUT NAME="favecolor"> <P><INPUT TYPE=SUBMIT VALUE="submit"> </FORM> |
For radio buttons and submit buttons you can use the same name in more than one input to indicate different options. Notice in these examples that the names are the same but the values for each option change:
| this code | produces this |
<FORM ACTION="../cgi-bin/mycgi.pl"> What size pizza?<P> <INPUT TYPE=RADIO NAME="pizzasize" VALUE="S">small<BR> <INPUT TYPE=RADIO NAME="pizzasize" VALUE="M">medium<BR> <INPUT TYPE=RADIO NAME="pizzasize" VALUE="L">large<P> <INPUT TYPE=SUBMIT VALUE="submit"> </FORM> | |
<FORM ACTION="../cgi-bin/mycgi.pl"> Go to the check-out page? <INPUT TYPE=SUBMIT NAME="checkout" VALUE="YES"> <INPUT TYPE=SUBMIT NAME="checkout" VALUE="NO"> </FORM> |
Forms that use scripting also use NAMEthis.form.email to refer to the email input field. This code requests an email
address. If none is given, the form is not submitted.
<FORM
ACTION="../cgi-bin/mycgi.pl"
onSubmit="return (this.email.value != '')"
>
email: <INPUT NAME="email">
<P><INPUT TYPE=SUBMIT VALUE="submit">
</FORM>
which gives us
|
Recommended Resources |
|||
| web hosting tutorials Credit Help |
Search the Internet Search Engine Help |
Low Fat Lifestyle Internet Traffic |
Web
Hosting Web Design |
|
Discount
Hotel Reservations All
Rights Reserved, Copyright © Free-HTML-Tutorials.com 2003 |
|||