YouTip LogoYouTip

Prop Fieldset Disabled

# Fieldset disabled Property [![Image 8: Fieldset Object Reference Manual](#) Fieldset Object](#) ## Example Disable a fieldset: document.getElementById("myFieldset").disabled=true; Output: Personalia: Username: Email: Date of Birth: [Try it Β»](#) * * * ## Definition and Usage The disabled property sets or returns whether a group of related form elements (a fieldset) is disabled. If this property is set, the form elements in the fieldset are disabled. Disabled elements are unusable and unclickable. By default, disabled elements are typically displayed in gray in browsers. This property reflects the HTML disabled attribute. * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) The disabled property is supported in all major browsers except Internet Explorer and Safari. * * * ## Syntax Return the disabled property: _fieldsetObject_.disabled Set the disabled property: _fieldsetObject_.disabled=true|false ## Property Values | Value | Description | | --- | --- | | true|false | Specifies whether a group of related form elements (a fieldset) is disabled. * true - The fieldset is disabled. * false - Default. The fieldset is not disabled. | ## Technical Details | Return Value: | A Boolean, returns true if the fieldset is disabled, otherwise false. | | --- | * * * ## More Examples ## Example Check if a fieldset is disabled: var x = document.getElementById("myFieldset").disabled; _x_ outputs: true [Try it Β»](#) ## Example Disable and enable a fieldset: function disableField() { document.getElementById("myFieldset").disabled=true; } function undisableFieldset() { document.getElementById("myFieldset").disabled=false; } [Try it Β»](#) * * * ## HTML Reference Manual: [HTML
disabled Attribute](#) * (#)
← Prop Fieldset FormDom Obj Fieldset β†’