HTML and CSS Reference
In-Depth Information
Change the <select> element name attribute to “thembeans”. Reload the form and resubmit
your order. How does this affect the results you get back from the server script?
Make sure you change the name back to “beans” when you're done with this exercise.
Give the customer a choice of whole or ground beans
The customer needs to be able to choose whole or ground beans
for her order. For those, we're going to use radio buttons. Radio
buttons are like the buttons on old car radios—you can push only
one in at a time. The way they work in HTML is that you create
one <input> of type “radio” for each button, so in this case you
need two buttons: one for whole beans and one for ground. Here's
what that looks like:
Ther e are two
radio buttons here:
one f or whole beans,
and one for ground.
<p> Type: <br>
<input type="radio" name="beantype" value="whole"> Whole bean <br>
<input type="radio" name="beantype" value="ground"> Ground
N otice that we
of ten label radio
bu ttons on t he
ri ghthand si de of
th e element .
We're using the <input>
element for this, with its
type set to “radio”.
Search WWH ::

Custom Search