Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Checkbox disabled attribute

Checkbox disabled attribute

Checkbox Object Reference Checkbox Object


Example

Example 1

Disable the checkbox:

Output result:

Try it »


Definition and Usage

The disabled attribute sets or returns whether the checkbox is disabled.

A disabled element is unusable, that is, not clickable. Disabled elements are usually displayed in gray in the browser.

Syntax

Set the disabled attribute:

element

.disabled=true|false

Return the disabled attribute:

element

.disabled


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the disabled attribute


Checkbox Object Reference Checkbox Object