Js Form Verification Code memo

Source: Internet
Author: User
1: js string length limit, judgment character length, js restriction input, restriction not input, textarea length limit 2.: js determines Chinese characters, determines whether Chinese characters are entered, only Chinese characters can be entered 3: js determines whether to enter English letters, only English letters 4: js can only enter numbers, determine numbers, verify numbers ,... syntaxHighlighter. all ();

 

1: js string length limit, determination character length, js restriction input, restriction not input, textarea length limit

2.: js judges Chinese characters, determines whether Chinese characters are needed, and can only input Chinese Characters

3: js determines whether the input is in English. Only English can be entered.

4: javascript can only enter numbers, determine numbers, verify numbers, detect numbers, determine whether they are numbers, and only enter numbers

5: Only English characters and numbers can be entered

6: js email verification, js judgment email, mailbox/mailbox format Verification

7: js character filtering, blocking keywords

8: js password verification and password Determination

2.1: js is not empty, empty, or not an object. The judgment is empty. The judgment is not empty.

2.2: compare whether the values of two form items are the same

2.3: The form can only contain numbers and "_",

2.4: Number/length limit entered for Form Items

2.5: Chinese/English/number/email address legality judgment

2.6: Restrict characters that cannot be entered for Form Items

2.7 form User Control

2.8: Common verification functions for form text fields

 

1. length limit

Script

Function test ()

{

If (document. a. B. value. length> 50)

{

Alert ("cannot exceed 50 characters! ");

Document. a. B. focus ();

Return false;

}

}

Script

 

2. Only Chinese characters are allowed

 

3. "English only

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.