#maxlength vs #size form api reference

#maxlength

Used by: password, textfield

Description: The maximum amount of characters to accept as input.

Values: A positive number.

Usage example (forum.module):

-----------------

#size

Used by: file, password, password_confirm, select, textfield

Description: Width of the textfield (in characters) or size of multiselect box (in lines).

Values: A positive number.

Usage example (comment.module):
----
两个属性还是有点区别的的,在form api reference 看到点击目录可以跳转到具体的条目, 以前都不知道, 确实是失误, 看来是活到老学到老呀。
maxlength: 可以输入到少个字符
size: 输入框的长度

posted @ 2020-06-16 16:09  qqisnow2021  阅读(113)  评论(0编辑  收藏  举报