HTML and CSS Reference
In-Depth Information
100,000+
120,000+
These could be represented as a data list like so:
<datalist id="salaries">
<option value="40,000+" />
<option value="60,000+" />
<option value="80,000+" />
<option value="100,000+" />
<option value="120,000+" />
</datalist>
The text input field then can make use of this list by setting its
list
attribute to the
ID of the data list:
<p><input type="text" name="salary" placeholder="Enter de-
sired salary" list="salaries" /></p>
The result is that when the user starts typing a value in the field, relevant matches in
the data list will pop up, as shown in
Figure 4-19
.
__________
5
Excluded are
password
,
checkbox
,
radio
,
file
,
hidden
,
image
,
button
,
submit
,
and
reset
.
Search WWH ::
Custom Search