HTML DOM Fieldset Object
Fieldset Object
วัตถุ Fieldset แสดงถึงองค์ประกอบ HTML <fieldset>
เข้าถึง Fieldset Object
คุณสามารถเข้าถึง <fieldset> องค์ประกอบโดยใช้ getElementById():
ตัวอย่าง
var x = document.getElementById("myFieldset");
เคล็ดลับ:คุณยังสามารถเข้าถึงออบเจ็กต์ Fieldset ได้ด้วยการค้นหาผ่าน คอลเลกชั่น องค์ประกอบของฟอร์ม
สร้าง Fieldset Object
คุณสามารถสร้าง <fieldset> องค์ประกอบโดยใช้ document.createElement() วิธีการ:
ตัวอย่าง
var x = document.createElement("FIELDSET");
คุณสมบัติอ็อบเจ็กต์ Fieldset
Property | Description |
---|---|
disabled | Sets or returns whether a fieldset is disabled, or not |
form | Returns a reference to the form that contains the fieldset |
name | Sets or returns the value of the name attribute of a fieldset |
type | Returns which type of form element the fieldset is |
คุณสมบัติและเหตุการณ์มาตรฐาน
ออบเจ็กต์ Fieldset ยังสนับสนุนคุณสมบัติและเหตุการณ์ มาตรฐาน อีกด้วย
หน้าที่เกี่ยวข้อง
กวดวิชา HTML: แบบฟอร์ม HTML
การอ้างอิง HTML: แท็ก HTML <fieldset>