html5/spec Overview.html,1.2982,1.2983

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv20797

Modified Files:
	Overview.html 
Log Message:
<form>, <fieldset> examples (whatwg r3814)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2982
retrieving revision 1.2983
diff -u -d -r1.2982 -r1.2983
--- Overview.html	12 Sep 2009 04:02:19 -0000	1.2982
+++ Overview.html	12 Sep 2009 08:39:13 -0000	1.2983
@@ -27005,6 +27005,17 @@
   method is invoked, the user agent must <a href="#broadcast-formchange-events">broadcast <code title="event-formchange">formchange</code> events</a> from the
   <code><a href="#the-form-element">form</a></code> element.</p>
 
+  </div><div class="example">
+
+   <p>This example shows two search forms:</p>
+
+   <pre>&lt;form action="http://www.google.com/search" method="get"&gt;
+ &lt;label&gt;Google: &lt;input type="search" name="q"&gt;&lt;/label&gt; &lt;input type="submit" value="Search..."&gt;
+&lt;/form&gt;
+&lt;form action="http://www.bing.com/search" method="get"&gt;
+ &lt;label&gt;Bing: &lt;input type="search" name="q"&gt;&lt;/label&gt; &lt;input type="submit" value="Search..."&gt;
+&lt;/form&gt;</pre>
+
   </div><h4 id="the-fieldset-element"><span class="secno">4.10.2 </span>The <dfn><code>fieldset</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Working draft</i><dl class="element"><dt>Categories</dt>
    <dd><a href="#flow-content">Flow content</a>.</dd>
    <dd><a href="#category-listed" title="category-listed">Listed</a> <a href="#form-associated-element">form-associated element</a>.</dd>
@@ -27084,6 +27095,23 @@
   elements are always <a href="#barred-from-constraint-validation">barred from constraint
   validation</a>.</p>
 
+  </div><div class="example">
+
+   <p>The following snippet shows a fieldset with a checkbox in the
+   legend that controls whether or not the fieldset is enabled. The
+   contents of the fieldset consist of two required text fields and an
+   optional year/month control.</p>
+
+   <pre>&lt;fieldset name="clubfields" disabled&gt;
+ &lt;legend&gt; &lt;label&gt;
+  &lt;input type=checkbox name=club onchange="form.clubfields.disabled = !checked"&gt;
+  Use Club Card
+ &lt;/label&gt; &lt;/legend&gt;
+ &lt;p&gt;&lt;label&gt;Name on card: &lt;input name=clubname required&gt;&lt;/label&gt;&lt;/p&gt;
+ &lt;p&gt;&lt;label&gt;Card number: &lt;input name=clubnum required pattern="[-0-9]+"&gt;&lt;/label&gt;&lt;/p&gt;
+ &lt;p&gt;&lt;label&gt;Expiry date: &lt;input name=clubexp type=month&gt;&lt;/label&gt;&lt;/p&gt;
+&lt;/fieldset&gt;</pre>
+
   </div><h4 id="the-label-element"><span class="secno">4.10.3 </span>The <dfn><code>label</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</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 Saturday, 12 September 2009 08:39:27 UTC