- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Sat, 12 Sep 2009 08:39:17 +0000
- To: public-html-commits@w3.org
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><form action="http://www.google.com/search" method="get"> + <label>Google: <input type="search" name="q"></label> <input type="submit" value="Search..."> +</form> +<form action="http://www.bing.com/search" method="get"> + <label>Bing: <input type="search" name="q"></label> <input type="submit" value="Search..."> +</form></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><fieldset name="clubfields" disabled> + <legend> <label> + <input type=checkbox name=club onchange="form.clubfields.disabled = !checked"> + Use Club Card + </label> </legend> + <p><label>Name on card: <input name=clubname required></label></p> + <p><label>Card number: <input name=clubnum required pattern="[-0-9]+"></label></p> + <p><label>Expiry date: <input name=clubexp type=month></label></p> +</fieldset></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