Difference between “maxlength” & “size” attribute in html?

后端 未结 4 1365
梦毁少年i
梦毁少年i 2021-01-31 08:48

I am little bit confused about the difference between the maxlength and the size attribute.



        
4条回答
  •  逝去的感伤
    2021-01-31 09:00

    size is "how big" it should be on screen. max-length is the maximum number of characters the browser should allow to be entered into a field. They're not at all related. You could have have size = 50 kajillion, max-length=1 if you wanted to be a sadistic page designer.

提交回复
热议问题