HTML-<textarea > -Formularattribut

❮ HTML-<textarea>-Tag

Beispiel

Ein Textbereich außerhalb eines Formulars (aber immer noch Teil des Formulars):

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

Definition und Verwendung

Das formAttribut gibt an, zu welchem ​​Formular der Textbereich gehört.

Der Wert dieses Attributs muss gleich dem idAttribut eines <form> Elements im selben Dokument sein.


Browser-Unterstützung

Attribute
form Yes 11.0 Yes Yes Yes

Syntax

<textarea form="form_id">

Attributwerte

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