Navigation Menu

Skip to content

Commit

Permalink
[e] (0) readonly='' example.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@3816 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 13, 2009
1 parent 57265d9 commit 9e7c8c6
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
32 changes: 32 additions & 0 deletions index
Expand Up @@ -34787,6 +34787,38 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H

</div>

<div class=example>

<p>In the following example, the existing product identifiers
cannot be modified, but they are still displayed as part of the
form, for consistency with the row representing a new product
(where the identifier is not yet filled in).</p>

<pre>&lt;form action="products.cgi" method=post enctype="multipart/formdata"&gt;
&lt;table&gt;
&lt;tr&gt; &lt;th&gt; Product ID &lt;th&gt; Product name &lt;th&gt; Price &lt;th&gt; Action
&lt;tr&gt;
&lt;td&gt; &lt;input readonly name="1.pid" value="H412"&gt;
&lt;td&gt; &lt;input required name="1.pname" value="Floor lamp Ulke"&gt;
&lt;td&gt; $&lt;input required type=number min=0 step=0.01 name="1.pprice" value="49.99"&gt;
&lt;td&gt; &lt;button formnovalidate name="action" value="delete:1"&gt;Delete&lt;/button&gt;
&lt;tr&gt;
&lt;td&gt; &lt;input readonly name="2.pid" value="FG28"&gt;
&lt;td&gt; &lt;input required name="2.pname" value="Table lamp Ulke"&gt;
&lt;td&gt; $&lt;input required type=number min=0 step=0.01 name="2.pprice" value="24.99"&gt;
&lt;td&gt; &lt;button formnovalidate name="action" value="delete:2"&gt;Delete&lt;/button&gt;
&lt;tr&gt;
&lt;td&gt; &lt;input required name="3.pid" value="" pattern="[A-Z0-9]+"&gt;
&lt;td&gt; &lt;input required name="3.pname" value=""&gt;
&lt;td&gt; $&lt;input required type=number min=0 step=0.01 name="3.pprice" value=""&gt;
&lt;td&gt; &lt;button formnovalidate name="action" value="delete:3"&gt;Delete&lt;/button&gt;
&lt;/table&gt;
&lt;p&gt; &lt;button formnovalidate name="action" value="add"&gt;Add&lt;/button&gt; &lt;/p&gt;
&lt;p&gt; &lt;button name="action" value="update"&gt;Save&lt;/button&gt; &lt;/p&gt;
&lt;/form&gt;</pre>

</div>



<h6 id=the-size-attribute><span class=secno>4.10.4.2.4 </span>The <code title=attr-input-size><a href=#attr-input-size>size</a></code> attribute</h6>
Expand Down
32 changes: 32 additions & 0 deletions source
Expand Up @@ -38686,6 +38686,38 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {

</div>

<div class="example">

<p>In the following example, the existing product identifiers
cannot be modified, but they are still displayed as part of the
form, for consistency with the row representing a new product
(where the identifier is not yet filled in).</p>

<pre>&lt;form action="products.cgi" method=post enctype="multipart/formdata">
&lt;table>
&lt;tr> &lt;th> Product ID &lt;th> Product name &lt;th> Price &lt;th> Action
&lt;tr>
&lt;td> &lt;input readonly name="1.pid" value="H412">
&lt;td> &lt;input required name="1.pname" value="Floor lamp Ulke">
&lt;td> $&lt;input required type=number min=0 step=0.01 name="1.pprice" value="49.99">
&lt;td> &lt;button formnovalidate name="action" value="delete:1">Delete&lt;/button>
&lt;tr>
&lt;td> &lt;input readonly name="2.pid" value="FG28">
&lt;td> &lt;input required name="2.pname" value="Table lamp Ulke">
&lt;td> $&lt;input required type=number min=0 step=0.01 name="2.pprice" value="24.99">
&lt;td> &lt;button formnovalidate name="action" value="delete:2">Delete&lt;/button>
&lt;tr>
&lt;td> &lt;input required name="3.pid" value="" pattern="[A-Z0-9]+">
&lt;td> &lt;input required name="3.pname" value="">
&lt;td> $&lt;input required type=number min=0 step=0.01 name="3.pprice" value="">
&lt;td> &lt;button formnovalidate name="action" value="delete:3">Delete&lt;/button>
&lt;/table>
&lt;p> &lt;button formnovalidate name="action" value="add">Add&lt;/button> &lt;/p>
&lt;p> &lt;button name="action" value="update">Save&lt;/button> &lt;/p>
&lt;/form></pre>

</div>



<h6>The <code title="attr-input-size">size</code> attribute</h6>
Expand Down

0 comments on commit 9e7c8c6

Please sign in to comment.