主题:  在cf中提交的表单数据怎样循环验证。

5DDC版主

职务:版主
等级:6
金币:10.0
发贴:3820
注册:2002/3/25 21:30:11
#162002/3/28 15:39:42
比如:你要验证它输入的内容是不适数字可以这么写:


明白了?

详细:
validate
Optional. Valid entries are:

date Verifies US date entry in the form mm/dd/yyyy.
eurodate Verifies European date entry in the form dd/mm/yyyy.
time Verifies a time entry in the form hh:mm:ss.
float Verifies a floating point entry.
integer Verifies an integer entry.
telephone Verifies a telephone entry. Telephone data must be entered as ###-###-####. The hyphen separator (-) can be replaced with a blank. The area code and exchange must begin with a digit between 1 and 9.
zipcode (U.S. formats only) Number can be a 5-digit or
9-digit zip in the form #####-####. The hyphen separator (-) can be replaced with a blank.
creditcard Blanks and dashes are stripped and the number is verified using the mod10 algorithm.
social_security_number Number must be entered as ###-##-####. The hyphen separator (-) can be replaced with a blank.
regular_expression Matches the input against the regular expression specified by the pattern attribute. Text that matches the regular expression pattern is valid.

以及用户法:
name = "name"
value = "initial_value"
required = "Yes" or "No"
range = "min_value, max_value"
validate = "data_type"
onValidate = "javascript_function"
pattern = "regexp"
message = "validation_msg"
onError = "text"
size = "integer"
maxLength = "integer"
checked
passThrough = "HTML_attributes">



5D荣誉斑竹

职务:普通成员
等级:3
金币:10.0
发贴:751
注册:2001/5/21 21:43:30
#172002/3/28 16:53:36
明白了,谢谢。