Attributo del modulo HTML <textarea>

❮ Tag HTML <textarea>

Esempio

Un'area di testo situata all'esterno di un modulo (ma fa ancora parte del modulo):

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

Definizione e utilizzo

L' formattributo specifica il modulo a cui appartiene l'area di testo.

Il valore di questo attributo deve essere uguale idall'attributo di un <form> elemento nello stesso documento.


Supporto browser

Attribute
form Yes 11.0 Yes Yes Yes

Sintassi

<textarea form="form_id">

Valori di attributo

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.

❮ Tag HTML <textarea>