What is the default maximum length of html input fields in a form and text area? is it limited at all?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
When there is no max length specified the default is an unlimited number of characters for both textarea and text input.
From the MDN web docs for textarea,
The maximum number of characters (unicode code points) that the user can enter. If this value isn't specified, the user can enter an unlimited number of characters. MDN Web Docs Textarea
for text input
If no maxlength is specified, or an invalid value is specified, the text input has no maximum length. MDN Web Docs Text Input
回答2:
If no maxlength
attribute is specified, then there is no limit to how much text a user can enter. This is the same for a text input or a textarea.