textarea提交表单
Text areas are for larger areas of text, such as a comments entry area in a form. <textarea>
is not specified as the attribute of an <input>
tag, but is its own tag.
文本区域用于较大的文本区域,例如表单中的注释输入区域。 <textarea>
指定为<input>
标记的属性,而是它自己的标记。
<textarea>
is also an exception to most of the form-specific tags we have seen thus far in that it is a closed tag. If you ever see HTML spilling inside a <textarea>
when you view a form in a browser, you know that you haven’t closed the <textarea>
properly, filling the area with anything that comes immediately after the opening tag:
到目前为止, <textarea>
也是大多数特定于表单的标签的例外,因为它是一个封闭标签。 如果在浏览器中查看表单时看到HTML溢出到<textarea>
内,则表明您没有正确关闭<textarea>
,并用在开始标记之后的所有内容填充了该区域:
<label for="comment" accesskey="m">Your comments</label>
<textarea name="comment" id="comment" rows="5" cols="80">
This is some default text
</textarea>
The size of a <textarea>
is also defined differently from other elements, through rows
and cols
attributes (respectively, the number of lines and characters per line that can be displayed in the <textarea>
).
<textarea>
的大小也通过rows
和cols
属性(分别是<textarea>
可以显示的行数和每行字符数)与其他元素定义不同。
翻译自: https://thenewcode.com/169/HTML-Forms-The-textarea-Element
textarea提交表单