number attribute
<input type=number>
Explanation
Number Attribute is used to enter a numerical value in the input field.
Attributes which can be used with this input type are listed below:
| Name | Description |
| max | The maximum value permitted in input field. |
| min | The minimum value permitted in input field. |
| step | Shows the legal number of intervals. |
| value | Mentions about default value of the numbers. |
Example Code:
Result :
- In case user enters "Text" in input field, then output will be shown as "Empty Value".
- If a particular input type is not applicable in a browser, then there will be no effect when
user enters data in input field.
Limitations:
It will function only in Safari, Opera and Chrome.