Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.
This property is read/write.
![]() |
Syntax
| HTML |
|---|
<element min="sMin" ... > |
| JavaScript |
|---|
object.min = sMin sMin = object.min |
Property values
Type: DOMString
A string containing the minimum numeric value the field accepts.
Standards information
- HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 4.10.7.3.10
Remarks
The following example shows the use of the min, max, and step attributes.
Note For more code samples, see Form controls part 1 and Form controls part 2: validation on the a Windows Store app using JavaScript sample site.
Examples
<form> <label> Enter an even number between 0 and 100: <input title="Enter an even number" type="number" min="0" max="100" step="2"> <input type="submit"> </label>
See also
Build date: 11/28/2012
