Thuộc tính tên HTML <fieldset>

❮ Thẻ HTML <fieldset>

Thí dụ

<fieldset> có thuộc tính name:

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

Định nghĩa và Cách sử dụng

Thuộc nametính chỉ định tên cho một tập trường.

Thuộc nametính được sử dụng để tham chiếu các phần tử trong JavaScript hoặc để tham chiếu dữ liệu biểu mẫu sau khi biểu mẫu được gửi.


Hỗ trợ trình duyệt

Attribute
name Yes 11.0 Yes Yes Yes

Cú pháp

<fieldset name="text">

Giá trị thuộc tính

Value Description
name Specifies the name of the fieldset

❮ Thẻ HTML <fieldset>