Fieldset disabled
Attribute
Example
Disable a fieldset:
Output result:
Definition and Usage
The disabled
attribute sets or returns whether a related group of form elements (a fieldset) is disabled.
If this attribute is set, it disables the form elements within the fieldset.
Disabled elements are unusable and unclickable. By default, disabled elements are typically rendered in gray by browsers.
This attribute reflects the HTML disabled
attribute.
Browser Support
Except for Internet Explorer and Safari, other major browsers support the disabled
attribute.
Syntax
Return the disabled
attribute:
Set the disabled
attribute:
Attribute Values
Value | Description |
---|---|
true|false | Specifies whether a related group of form elements (a fieldset) is disabled. true - Disables the fieldset.<br>false - Default. Does not disable the fieldset. |
Technical Details
| Return Value: | Boolean, returns true if the fieldset is disabled, otherwise returns false. | | --- | --- |
More Examples
Example
Check if a fieldset is disabled:
x Output result is:
Example
Disable and enable a fieldset:
Related Articles
HTML Reference: HTML <fieldset> disabled Attribute