#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">