HTML <fieldset> ชื่อแอตทริบิวต์
ตัวอย่าง
<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>