Browse files

[e] (0) step/min/max examples.

git-svn-id: http://svn.whatwg.org/webapps@3820 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent 52d14e3 commit 907a9578852a40645fecbb2a0390057a4d85fa98 @Hixie Hixie committed Sep 13, 2009
Showing with 82 additions and 0 deletions.
  1. +41 −0 index
  2. +41 −0 source
View
41 index
@@ -35066,6 +35066,24 @@ You cannot complete this form until the field is correct.</samp></pre>
</div>
+ <div class=example>
+
+ <p>The following date control limits input to dates that are before
+ the start of the 21st century:</p>
+
+ <pre>&lt;input name=bday type=date max="2000-12-31"&gt;</pre>
+
+ </div>
+
+ <div class=example>
+
+ <p>The following number control limits input to whole numbers
+ greater than zero:</p>
+
+ <pre>&lt;input name=quantity required type=number min=1 value=1&gt;</pre>
+
+ </div>
+
<h6 id=the-step-attribute><span class=secno>4.10.4.2.10 </span>The <code title=attr-input-step><a href=#attr-input-step>step</a></code> attribute</h6>
@@ -35127,6 +35145,29 @@ You cannot complete this form until the field is correct.</samp></pre>
</div>
+ <div class=example>
+
+ <p>The following range control only accepts values in the range
+ 0..1, and allows 256 steps in that range:</p>
+
+ <pre>&lt;input name=opacity type=range min=0 max=1 step=0.00392156863&gt;</pre>
+
+ </div>
+
+ <div class=example>
+
+ <p>The following control allows any time in the day to be selected,
+ with any accuracy (e.g. thousandth-of-a-second accuracy or
+ more):</p>
+
+ <pre>&lt;input name=favtime type=time step=any&gt;</pre>
+
+ <p>Normally, time controls are limited to an accuracy of one
+ minute.</p>
+
+ </div>
+
+
<h6 id=the-placeholder-attribute><span class=secno>4.10.4.2.11 </span>The <code title=attr-input-placeholder><a href=#attr-input-placeholder>placeholder</a></code> attribute</h6>
View
41 source
@@ -39000,6 +39000,24 @@ You cannot complete this form until the field is correct.</samp></pre>
</div>
+ <div class="example">
+
+ <p>The following date control limits input to dates that are before
+ the start of the 21st century:</p>
+
+ <pre>&lt;input name=bday type=date max="2000-12-31"></pre>
+
+ </div>
+
+ <div class="example">
+
+ <p>The following number control limits input to whole numbers
+ greater than zero:</p>
+
+ <pre>&lt;input name=quantity required type=number min=1 value=1></pre>
+
+ </div>
+
<h6>The <code title="attr-input-step">step</code> attribute</h6>
@@ -39079,6 +39097,29 @@ You cannot complete this form until the field is correct.</samp></pre>
</div>
+ <div class="example">
+
+ <p>The following range control only accepts values in the range
+ 0..1, and allows 256 steps in that range:</p>
+
+ <pre>&lt;input name=opacity type=range min=0 max=1 step=0.00392156863></pre>
+
+ </div>
+
+ <div class="example">
+
+ <p>The following control allows any time in the day to be selected,
+ with any accuracy (e.g. thousandth-of-a-second accuracy or
+ more):</p>
+
+ <pre>&lt;input name=favtime type=time step=any></pre>
+
+ <p>Normally, time controls are limited to an accuracy of one
+ minute.</p>
+
+ </div>
+
+
<h6>The <code title="attr-input-placeholder">placeholder</code> attribute</h6>

0 comments on commit 907a957

Please sign in to comment.