hixie: <select> examples (whatwg r3822)

hixie: <select> examples (whatwg r3822)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2990&r2=1.2991&f=h
http://html5.org/tools/web-apps-tracker?from=3821&to=3822

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2990
retrieving revision 1.2991
diff -u -d -r1.2990 -r1.2991
--- Overview.html 13 Sep 2009 08:29:19 -0000 1.2990
+++ Overview.html 13 Sep 2009 08:54:07 -0000 1.2991
@@ -32033,6 +32033,40 @@
   <code title="dom-lfe-labels"><a href="#dom-lfe-labels">labels</a></code> attribute provides a list
   of the element's <code><a href="#the-label-element">label</a></code>s.</p>
 
+  </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>&lt;p&gt;
+ &lt;label for="unittype"&gt;Select unit type:&lt;/label&gt;
+ &lt;select id="unittype" name="unittype"&gt;
+  &lt;option value="1"&gt; Miner &lt;/option&gt;
+  &lt;option value="2"&gt; Puffer &lt;/option&gt;
+  &lt;option value="3" selected&gt; Snipey &lt;/option&gt;
+  &lt;option value="4"&gt; Max &lt;/option&gt;
+  &lt;option value="5"&gt; Firebot &lt;/option&gt;
+ &lt;/select&gt;
+&lt;/p&gt;</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>&lt;p&gt;
+ &lt;label for="allowedunits"&gt;Select unit types to enable on this map:&lt;/label&gt;
+ &lt;select id="allowedunits" name="allowedunits" multiple&gt;
+  &lt;option value="1" selected&gt; Miner &lt;/option&gt;
+  &lt;option value="2" selected&gt; Puffer &lt;/option&gt;
+  &lt;option value="3" selected&gt; Snipey &lt;/option&gt;
+  &lt;option value="4" selected&gt; Max &lt;/option&gt;
+  &lt;option value="5" selected&gt; Firebot &lt;/option&gt;
+ &lt;/select&gt;
+&lt;/p&gt;</pre>
+
   </div><h4 id="the-datalist-element"><span class="secno">4.10.7 </span>The <dfn><code>datalist</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><dl class="element"><dt>Categories</dt>
    <dd><a href="#flow-content">Flow content</a>.</dd>
    <dd><a href="#phrasing-content">Phrasing content</a>.</dd>

Received on Sunday, 13 September 2009 08:55:05 UTC