Formularz HTML <textarea> Atrybut

❮ Znacznik HTML <textarea>

Przykład

Obszar tekstowy znajdujący się poza formularzem (ale nadal częścią formularza):

<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>

Definicja i użycie

Atrybut określa formę, do formktórej należy obszar tekstowy.

Wartość tego atrybutu musi być równa idatrybutowi <form> elementu w tym samym dokumencie.


Obsługa przeglądarki

Attribute
form Yes 11.0 Yes Yes Yes

Składnia

<textarea form="form_id">

Wartości atrybutów

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.

❮ Znacznik HTML <textarea>