Radio disabledProperty

Radio 对象参考手册Radio Object

Examples

Example 1

Disable the radio button:

<script>

document.getElementById("cats").disabled=true;

</script>

Output result:


Try it Yourself »


Definition and Usage

The disabled property sets or returns whether the radio button is disabled.

Disabled elements are neither usable nor clickable. The disabled attribute can be set until certain other conditions are met (for example, selecting a checkbox, etc.).

Syntax

Set the disabled property:

element.disabled=true|false

Return the disabled property:

element.disabled


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the disabled attribute


Radio 对象参考手册Radio Object Other extensions