HTML textarea form attributes
Examples
Located in form form outside the text area (but still form part of the form):
<form action="demo-form.php" id="usrform">
Name: <input type="text" name="usrname">
<input type="submit">
</form>
<textarea name="comment" form="usrform">输入内容...</textarea>
Name: <input type="text" name="usrname">
<input type="submit">
</form>
<textarea name="comment" form="usrform">输入内容...</textarea>
try it"
Browser Support
In addition to Internet Explorer, the other major browsers support form property.
Definition and Usage
form attribute specifies a text area belongs to one or more forms.
Differences between HTML 4.01 and HTML5
form attribute is new in HTML5 attributes.
grammar
<textarea form=" form_id ">
Property Value
值 | 描述 |
---|---|
form_id | 规定文本区域所属的一个或多个表单的 id 列表,以空格分隔。 |
HTML <textarea> tag