HTML <fieldset> name - Attribut

❮ HTML <fieldset>-Tag

Beispiel

Ein <fieldset> mit einem Namensattribut:

<form action="/action_page.php" method="get">
  <fieldset name="personalia">
    <label for="fname">First name:</label>
    <input type="text" id="fname" name="fname">
  </fieldset>
  <br>
  <button type="button"
  onclick="form.personalia.style.backgroundColor='yellow'">
  Change background color of fieldset</button>
  <input type="submit">
</form>

Definition und Verwendung

Das nameAttribut gibt einen Namen für ein Fieldset an.

Das nameAttribut wird verwendet, um auf Elemente in einem JavaScript oder auf Formulardaten zu verweisen, nachdem ein Formular gesendet wurde.


Browser-Unterstützung

Attribute
name Yes 11.0 Yes Yes Yes

Syntax

<fieldset name="text">

Attributwerte

Value Description
name Specifies the name of the fieldset

❮ HTML <fieldset>-Tag