November 2011
Intermediate to advanced
384 pages
13h 23m
English
You can use the number input type to restrict input fields to numeric values only. Supported web browsers will inhibit any nonnumeric data from being submitted. You can set a minimum and maximum number range and an interval. If a number is outside of the specified range or is not divisible by the stepping value, it will be rejected with a pop-up message.
<input type='number' name='field' value='number' min='number' max='number' step='number'>
The type='number' attribute value activates the number-specific input options of the user’s web browser, if supported. Additional input element attributes, such as name and value, have the same meaning and functionality common in HTML forms. Any combination of the min, max ...
Read now
Unlock full access