HTML <フィールドセット>名属性
例
name属性を持つ<fieldset>:
<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>
定義と使用法
このname
属性は、フィールドセットの名前を指定します。
このname
属性は、JavaScriptの要素を参照するため、またはフォームの送信後にフォームデータを参照するために使用されます。
ブラウザのサポート
Attribute | |||||
---|---|---|---|---|---|
name | Yes | 11.0 | Yes | Yes | Yes |
構文
<fieldset name="text">
属性値
Value | Description |
---|---|
name | Specifies the name of the fieldset |
❮HTML<fieldset>タグ