HTML DOM Fieldset disabled property
Definition and Usage
disabled property sets or returns whether to disable a group of related form elements (a fieldset).
If this attribute is set, fieldset in the form properties are disabled.
Disabled elements are not available, and do not click. By default, the disabled elements typically exhibit gray in your browser.
This property reflects the HTML disabled property.
Browser Support
In addition to Internet Explorer and Safari, the other major browsers support the disabled attribute.
grammar
Returns disabled properties:
fieldsetObject .disabled
Set the disabled attribute:
fieldsetObject .disabled=true|false
Property Value
值 | 描述 |
---|---|
true|false |
指定是否禁用一组相关的表单元素(一个 fieldset)。
|
technical details
return value: | Boolean value that, if you disable fieldset returns true, otherwise returns false. |
---|
More examples
Examples
Detecting whether a fieldset is disabled:
var x = document.getElementById("myFieldset").disabled;
x The output is:
true
try it"
Examples
Disabling and Enabling a fieldset:
function disableField()
{
document.getElementById("myFieldset").disabled=true;
}
function undisableFieldset()
{
document.getElementById("myFieldset").disabled=false;
}
{
document.getElementById("myFieldset").disabled=true;
}
function undisableFieldset()
{
document.getElementById("myFieldset").disabled=false;
}
try it"
related articles
HTML Reference Manual: HTML <fieldset> Disabled Property