Атрибут формы HTML <textarea>
Пример
Текстовая область, расположенная вне формы (но все же часть формы):
<form action="/action_page.php" id="usrform">
Name: <input type="text" name="usrname">
<input type="submit">
</form>
<textarea name="comment" form="usrform">Enter text here...</textarea>
Определение и использование
Атрибут form
определяет форму, которой принадлежит текстовая область.
Значение этого атрибута должно быть равно id
атрибуту
<form>
элемента в том же документе.
Поддержка браузера
Attribute | |||||
---|---|---|---|---|---|
form | Yes | 11.0 | Yes | Yes | Yes |
Синтаксис
<textarea form="form_id">
Значения атрибутов
Value | Description |
---|---|
form_id | Specifies the form element the <textarea> element belongs to. The value of this attribute must be the id attribute of a <form> element in the same document. |
❮ HTML-тег <textarea>