Short URL: http://html5.org/r/3822
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 3822 | <select> examples | 2009-09-13 08:59 |
Index: source =================================================================== --- source (revision 3821) +++ source (revision 3822) @@ -40237,7 +40237,46 @@ </div> + <div class="example"> + <p>The following example shows how a <code>select</code> element + can be used to offer the user with a set of options from which the + user can select a single option. The default option is + preselected</p> + + <pre><p> + <label for="unittype">Select unit type:</label> + <select id="unittype" name="unittype"> + <option value="1"> Miner </option> + <option value="2"> Puffer </option> + <option value="3" selected> Snipey </option> + <option value="4"> Max </option> + <option value="5"> Firebot </option> + </select> +</p></pre> + + </div> + + <div class="example"> + + <p>Here, the user is offered a set of options from which he can + select any number. By default, all five options are selected.</p> + + <pre><p> + <label for="allowedunits">Select unit types to enable on this map:</label> + <select id="allowedunits" name="allowedunits" multiple> + <option value="1" selected> Miner </option> + <option value="2" selected> Puffer </option> + <option value="3" selected> Snipey </option> + <option value="4" selected> Max </option> + <option value="5" selected> Firebot </option> + </select> +</p></pre> + + </div> + + + <h4>The <dfn><code>datalist</code></dfn> element</h4> <dl class="element">