In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces html5 how to set up input can only input numbers, the article is very detailed, has a certain reference value, interested friends must read it!
In html5, you can only enter numbers through the type attribute of the input tag, just set the value of the type attribute to "number", syntax "".
The operating environment of this tutorial: windows7 system, HTML5 version, Dell G3 computer.
The label specifies the input fields in which the user can enter data.
Input fields come in a variety of forms depending on the type property. Input fields can be text fields, check boxes, password fields, radio buttons, buttons, and so on.
If you want to set input to enter only numbers, simply set the value of the type property to "number":
Output result:
Add: the type of input element-the value that can be set by the type attribute
Value description button defines clickable buttons (usually used with JavaScript to start a script). Checkbox definition check box. Color defines the color picker. Date defines date controls (including year, month, day, not time). Datetime defines date and time controls (including year, month, day, hour, minute, second, fraction of a second, based on the UTC time zone). Datetime-local defines date and time controls (including year, month, day, hour, minute, second, fraction of a second, without time zone). Email defines the fields used for e-mail addresses. File defines file selection fields and "browse." Button for file upload. Hidden defines hidden input fields. Image defines the image as the submit button. Month defines month and year controls (without a time zone). Number defines the fields used to enter numbers. Password defines the password field (the characters in the field are obscured). Radio defines radio buttons. Range defines controls (such as slider controls) that are used to enter numbers whose exact values are not important. Reset defines the reset button (resets all form values to default values). Search defines the text field used to enter the search string. Submit defines the submit button. Tel defines the fields used to enter phone numbers. Text defaults. Define a single-line text field (the default width is 20 characters). Time defines the control (without time zone) that is used to enter time. Url defines the fields used to enter URL. Week defines week and year controls (without a time zone). The above is all the contents of the article "how to set input to enter numbers only" in html5. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.