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
- Basic Expression Demo
- Built-in expression Demo
- External functions and add-in expressions Demo
- Single Pop-up hint demo
- Custom Alert Test