Skip to content
Permalink
Browse files

[e] (0) <textarea> and <output> examples, plus some minor changes to …

…others.

git-svn-id: http://svn.whatwg.org/webapps@3824 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Sep 13, 2009
1 parent 89f2592 commit 88b071dac226913032cf954782847773a480ad3e
Showing with 50 additions and 6 deletions.
  1. +25 −3 index
  2. +25 −3 source
28 index
<div class=example>

<p>The following date control limits input to dates that are before
the start of the 21st century:</p>
the 1980s:</p>

<pre>&lt;input name=bday type=date max="2000-12-31"&gt;</pre>
<pre>&lt;input name=bday type=date max="1979-12-31"&gt;</pre>

</div>


</div>

<div class=example>

<p>Here is an example of a <code><a href=#the-textarea-element>textarea</a></code> being used for
unrestricted free-form text input in a form:</p>

<pre>&lt;p&gt;If you have any comments, please let us know: &lt;textarea cols=80 name=comments&gt;&lt;/textarea&gt;&lt;/p&gt;</pre>

</div>



<h4 id=the-keygen-element><span class=secno>4.10.11 </span>The <dfn><code>keygen</code></dfn> element</h4>

<pre>&lt;form action="processkey.cgi" method="post" enctype="multipart/formdata"&gt;
&lt;p&gt;&lt;keygen name="key"&gt;&lt;/p&gt;
&lt;p&gt;&lt;input type=submit value="Submit key..."&gt;
&lt;p&gt;&lt;input type=submit value="Submit key..."&gt;&lt;/p&gt;
&lt;/form&gt;</pre>

<p>The server will then receive a form submission with a packaged

</div>

<div class=example>

<p>A simple calculator could use <code><a href=#the-output-element>output</a></code> for its
display of calculated results:</p>

<pre>&lt;form onsubmit="return false"&gt;
&lt;input name=a type=number step=any&gt; +
&lt;input name=b type=number step=any&gt; =
&lt;output onforminput="value = a.value + b.value"&gt;&lt;/output&gt;
&lt;/form&gt;</pre>

</div>



<h4 id=association-of-controls-and-forms><span class=secno>4.10.13 </span>Association of controls and forms</h4>
28 source
<div class="example">

<p>The following date control limits input to dates that are before
the start of the 21st century:</p>
the 1980s:</p>

<pre>&lt;input name=bday type=date max="2000-12-31"></pre>
<pre>&lt;input name=bday type=date max="1979-12-31"></pre>

</div>


</div>

<div class="example">

<p>Here is an example of a <code>textarea</code> being used for
unrestricted free-form text input in a form:</p>

<pre>&lt;p>If you have any comments, please let us know: &lt;textarea cols=80 name=comments>&lt;/textarea>&lt;/p></pre>

</div>



<h4>The <dfn><code>keygen</code></dfn> element</h4>

<pre>&lt;form action="processkey.cgi" method="post" enctype="multipart/formdata">
&lt;p>&lt;keygen name="key">&lt;/p>
&lt;p>&lt;input type=submit value="Submit key...">
&lt;p>&lt;input type=submit value="Submit key...">&lt;/p>
&lt;/form></pre>

<p>The server will then receive a form submission with a packaged

</div>

<div class="example">

<p>A simple calculator could use <code>output</code> for its
display of calculated results:</p>

<pre>&lt;form onsubmit="return false">
&lt;input name=a type=number step=any> +
&lt;input name=b type=number step=any> =
&lt;output onforminput="value = a.value + b.value">&lt;/output>
&lt;/form></pre>

</div>



<h4>Association of controls and forms</h4>

0 comments on commit 88b071d

Please sign in to comment.
You can’t perform that action at this time.