English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <fieldset> name Attribut

HTML fieldset name Attribut legt den Namen des fieldset fest, das Attribut "name" wird verwendet, um Elemente in JavaScript zu referenzieren oder um Formulardaten nach dem Absenden des Formulars zu referenzieren.

 HTML <fieldset> Tag

Online-Beispiel

mit dem Attribut "name" versehene <fieldset>:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML <fieldset> name Attribute verwenden-Grund教程(oldtoolbag.com)</title>
body>/head>
<body>
<form action="action_page.php" method="get">
<fieldset name="personalia">
  Name: <input type="text" name="username"><br>
  E-Mail: <input type="text" name="usermail"><br>
body>/fieldset>
<button type="button" onclick="form.personalia.style.backgroundColor='yellow'yellow&#/">Change background color of fieldset<
button>
body>/<input type="submit">
body>/form>
body>/<
html>/Test see ‹

Browser compatibilityIEFirefoxOperaChrome

Safari

In addition to Internet Explorer, other mainstream browsers support the name attribute.

Definition and usage

The name attribute defines the name of the fieldset.

The name attribute is used to refer to elements in JavaScript, or to refer to form data after submitting the form. 4HTML1 .05and HTML

The difference between the attribute of the <fieldset> tag in HTML5 new attribute in

Syntax

<fieldset name="text">

Attribute value

ValueDescription
nameDefine the name of the fieldset.
 HTML <fieldset> Tag