Latest web development tutorials

HTML DOM Fieldset objects

Fieldset objects

Fieldset object represents an HTML <fieldset> element.

Object Access Fieldset

You can use getElementById () to access the <fieldset> element:

var x = document.getElementById("myFieldset"); 尝试一下

Tip: You can also search for form elements to access Fieldset collection of objects.

Objects created Fieldset

You can use the document.createElement () method to create a <fieldset> element:

var x = document.createElement("myFieldset"); 尝试一下

Fieldset object properties

= HTML5 in the new property.

属性 描述
disabled 设置或返回是否禁用 fieldset。
form 返回一个包含 fieldset 的表单的引用。
name 设置或返回 fieldset 的 name 属性的值。
type 返回 fieldset 是哪一个类型的表单元素。

Standard properties and events

Fieldset objects also supports standard attributes and events .


related articles

HTML Tutorial: HTML Forms

HTML Reference Manual: HTML <fieldset> tag