Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[e] (0) <form>, <fieldset> examples
- Loading branch information
Showing
with
66 additions
and
0 deletions.
-
+33
−0
index
-
+33
−0
source
|
|
|
|
|
|
|
|
</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> |
|
|
|
|
|
|
|
</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> |
|
|
|
|
|
|
|
|
</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>The <dfn><code>fieldset</code></dfn> element</h4> |
|
|
|
|
|
|
|
</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>The <dfn><code>label</code></dfn> element</h4> |