A JS. The input box allows the user to enter only the number and letter types of the content, the object is input box, of course, but also other objects, but input box with very high frequency. A code, do not believe it? Then look at the code below:
The following code is added to the area of HTML:
The following code joins the HTML area, the form submits the section:
Note: The name of the form and the name of the text box should remain the same.
Set the input condition of EditText in Android, androidedittextI. Application scenarios
In the previous shopping mall applications, user data settings were limited as follows:
(1) only English letters, numbers, and @. can be entered in the user's
The text box limits the input box of the input type . The input box
After a project was developed recently, the tester tested the bug. Then I changed the bug one by one based on the bugs they tested. Then I encountered a problem. The text box was
JS judgment can only be a number or a decimal point0. Chinese characters cannot be entered1) 2) 1. Only numeric code can be entered in the text box (decimal point cannot be entered)2. Only numbers can be entered, and decimal points can be entered.3.
This article describes how to restrict only numbers and letters in the Javascript restricted text box. This article provides three types of scripts: limited to numbers, limited to letters, and limited to numbers and letters, for more information,
The following are some of the regular expressions that are frequently used by you for your reference. Only numbers are allowed: & quot; ^ [0-9] * $ & quot; only numbers of n digits are allowed: & quot; ^ d {n} $ & quot; only numbers with at least n
This article describes how to restrict only numbers and letters in the JavaScript restricted text box. This article provides three types of scripts: limited to numbers, limited to letters, and limited to numbers and letters, for more information,
1. Verification Number:Only one number can be entered
Expression ^ \ D $The description matches a number.Matching example 0, 1, 2, 3Example of Mismatch
2. Only n numbers can be enteredExpression ^ \ D {n} $ for example ^ \ D {8} $The description
ASP. NET validation Regular expressionInteger or decimal: ^[0-9]+\. {0,1} [0-9] {0,2}$Only numbers can be entered: "^[0-9]*$".Only n digits can be entered: "^\d{n}$".Only numbers with at least n digits can be entered: "^\d{n,}$".You can enter only
ASP. NET validation Regular expressioninteger or decimal: ^[0-9]+\. {0,1} [0-9] {0,2}$only numbers can be entered: "^[0-9]*$". only n digits can be entered: "^\d{n}$". only numbers with at least n digits can be entered: "^\d{n,}$". You can enter
Integer or decimal point: ^ [0-9] + \. {} [0-9] {} $
Only numbers are allowed: "^ [0-9] * $ ".
Only n digits can be entered: "^ \ d {n} $ ".
You can only enter at least n digits: "^ \ d {n,} $ ".
Only m ~ can be input ~ N-digit :. "^ \ D {m, n}
1. Only numbers can be entered in the text box
Code (Decimal point cannot be entered)
2. Only numbers can be entered, and decimal points can be entered.
3. Number and decimal point method 2
4. Only letters and Chinese characters can be entered
Integer or decimal: ^[0-9]+\. {0,1} [0-9] {0,2}$Only numbers can be entered: "^[0-9]*$".Only n digits can be entered: "^\d{n}$".Only numbers with at least n digits can be entered: "^\d{n,}$".You can enter only the digits of the m~n bit:.
Integer or decimal point: ^ [0-9] + \. {} [0-9] {} $Only numbers are allowed: "^ [0-9] * $ ".Only n digits can be entered: "^ \ d {n} $ ".You can only enter at least n digits: "^ \ d {n,} $ ".Only m ~ can be input ~ N-digit :. "^ \ D {m, n} $"Only
Integer or decimal: ^[0-9]+\. {0,1} [0-9] {0,2}$Only numbers can be entered: "^[0-9]*$".Only n digits can be entered: "^\d{n}$".Only numbers with at least n digits can be entered: "^\d{n,}$".You can enter only the digits of the m~n bit:.
ENTER to move the cursor to the next input box
Only Chinese
Shielded Input Method
Only English and numbers can be entered.
Only numbers are allowed.
Display only, cannot modify
You can only enter numbers to determine the key value.Copy codeThe Code
Integer or decimal: ^[0-9]+\. {0,1} [0-9] {0,2}$Only numbers can be entered: "^[0-9]*$".Only n digits can be entered: "^\d{n}$".Only numbers with at least n digits can be entered: "^\d{n,}$".You can enter only the digits of the m~n bit:.
Integer or decimal: ^[0-9]+\. {0,1} [0-9] {0,2}$Only numbers can be entered: "^[0-9]*$".Only n digits can be entered: "^\d{n}$".Only numbers with at least n digits can be entered: "^\d{n,}$".You can enter only the digits of the m~n bit:.
It's up to you to see what you're supposed to see, and you're going to go around saying good-bye. dizzyingFirst one to scare you.This is just a primer ... [Maybe it won't scare you but behind ...]Do you want to scare you ...ASP. NET validation
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.