Java Reference
In-Depth Information
much the value changes by on each click. Most modern browsers will add
controls at the side of the input field so that the value can be increased or
decreased, as shown in Figure 8.5 .
Figure 8.5. Using the number input field to specify our hero's age
We'll also need some JavaScript to process the age information. Add the
following line to the makeHero() function in scripts.js:
hero.age = form.age.value;
These new input types are yet to be all supported, but the good news is that
you can start using them now because they will still work; the browser will
just display a normal text input field if it doesn't support a particular type.
Search WWH ::




Custom Search