Jquery and a custom wl_check attribute are mainly used. The attributes are described as follows:
1. Syntax
[Need: True, type: int, maxlen: 15, minlen: 2]
2. Keywords
Need: mandatory limit for text input boxes
Regtype: Regular Expression type verification in the text input box
Minlen: minimum input length of the text input box
Maxlen: maximum input length of a text input box
Minval: the maximum value of the numeric text input box.
Maxval: the maximum value of the numeric text input box.
Notval: required in the drop-down list.
Minselect: Minimum number of options for a single check box
Maxselect: Maximum number of options for a single check box
...
3. Scope of use
Input: Text
Input: Radio note that the ID is '_ I'
Input: checkbox note that the ID is '_ I'
Textarea
Select
4. Description
1. When the value of the Form Control with the wl_check attribute changes, the corresponding verification method is automatically called. This method does not return a value, but only prompts and locates an error.
2. During page post, you must first verify the Form Control with the wl_check attribute in a certain domain and return true; otherwise, a prompt message is displayed and the submission is canceled.
5. Usage example-see demo
<Input type = "text" id = "name" value = 'dd' Title = 'name' wl_check = "Need: True, minlen: 2, maxlen: 10"/>
It indicates that this text box is required and has a maximum of 10 words, at least 2 words
DemoCode: Http://demo.jb51.net/js/wl_check/index.htm