Name

DISABLED — NN n/a IE 4 HTML 4

Synopsis

DISABLED

Optional

A disabled BUTTON element appears grayed out on the screen and cannot be activated by the user. In Windows, a disabled BUTTON cannot receive focus and does not become active within the tabbing order rotation. HTML 4.0 also specifies that a disabled BUTTON whose TYPE is submit should not send its name/value pair when the form is submitted.

The DISABLED attribute is a Boolean type, which means that its presence in the attribute sets its value to true. Its value can also be adjusted after the fact by scripting (see the button object in Chapter 9).

Example

<BUTTON TYPE="submit" DISABLED>Ready to Submit</BUTTON>

Value

The presence of the attribute sets its value to true.

Default

false

Object Model Reference

IE

[window.]document.all.elementID.disabled

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.