Common JavaScript verification functions

Source: Internet
Author: User
Many websites are composed of form submissions, but verification is required for some submissions. Client Verification

Many websites are composed of form submissions, but verification is required for some submissions. The simplest method for client verification is to use JS custom functions. This document contains 28 common verification functions and several verification functions.

Note the following points when calling functions in JS:

  1. Set onsubmit = "return test ()" for the form..
  2. Call function verification directly when you press the mouse.
  3. Pass in your own value for verification, test (this) Pass in the object itself for verification
  4. // Click Btn for verification. If the verification succeeds, use document. forms [0]. submit (); To submit the form.
  5. Use submit for submission and verification. If return false in test, return true if not.

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.