Free Web Programmer Input Validation _ form effects

Source: Internet
Author: User
This procedure was originally modified by the checkform of wanghr100 (gray Bean baby. net) and added many functions as follows:
    • Support for non-IE
    • Added built-in expressions and built-in hints
    • Increased display mode (pop-up and page display)
    • Added show one and show all
    • Encapsulated (Class_check)
    • Support for an external function or expression (applied in a password consistent)
    • Simplified invocation mode, all operations only need <script language= ' javascript ' src= ' Checkform.js ', and then define each label validation format in HTML
    • For IE to increase the restrictions on keyboard input ( such as: define usage= ' int '), the input box can only enter a number (not IE is not valid)
    • Added no validation to disabled
    • Custom alert mode (overriding Showmessageex method)
Disclaimer: This program can be reproduced any replication propagation, but please keep the declaration section, for the built-in expression some did not do very strict, if you have good suggestions and comments, welcome to contact me or on my blog message

Brief introduction:

This program only needs to verify the label to set three properties: Usage,exp,tip
    • usage : Built-in format or expression or function
    • exp : Regular expression (note ignore exp If usage is specified)
    • Tip : Error prompted (if the built-in format can not be this property, there are default prompts)
Call only needs to refer to <script language= ' javascript ' src= ' checkform.js ' ></script>, and then add the above 3 attributes for each tag (not necessarily all) , note that the default encoding of JS is gb2312, if your. NET program is Utf-8, you can save JS as a utf-8 format, or the Webconfig code for GB2312
Demonstrate:
    • Basic Expression Demo
    • Built-in expression Demo
    • External functions and add-in expressions Demo
    • Single Pop-up hint demo
    • Custom Alert Test
Download:
    • Download
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.