[html5] r3822 - [e] (0) <select> examples

whatwg at whatwg.org whatwg at whatwg.org
Sun Sep 13 01:59:13 PDT 2009


Author: ianh
Date: 2009-09-13 01:59:12 -0700 (Sun, 13 Sep 2009)
New Revision: 3822

Modified:
   index
   source
Log:
[e] (0) <select> examples

Modified: index
===================================================================
--- index	2009-09-13 08:34:23 UTC (rev 3821)
+++ index	2009-09-13 08:59:12 UTC (rev 3822)
@@ -36058,7 +36058,46 @@
 
   </div>
 
+  <div class=example>
 
+   <p>The following example shows how a <code><a href=#the-select-element>select</a></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 id=the-datalist-element><span class=secno>4.10.7 </span>The <dfn><code>datalist</code></dfn> element</h4>
 
   <dl class=element><dt>Categories</dt>

Modified: source
===================================================================
--- source	2009-09-13 08:34:23 UTC (rev 3821)
+++ source	2009-09-13 08:59:12 UTC (rev 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">




More information about the Commit-Watchers mailing list