Link disabled attribute

Definition and Usage

disabled Sets or returns whether the linked document is disabled.

This attribute is currently used only for stylesheet links.

When set to true, the linked stylesheet will have no effect.

See also:

HTML Reference Manual:HTML <link> Tag

Example

Example 1

Disable the linked document:

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

Try it yourself

Example 2

Check if the linked document is disabled:

var x = document.getElementById("myLink").disabled;

Try it yourself

Syntax

Return the disabled attribute:

linkObject.disabled

Set the disabled attribute:

linkObject.disabled = true|false

Attribute Value

Value Description
true|false

Specifies whether the linked document is disabled.

  • true - The linked document is disabled
  • false - The linked document is not disabled

Technical Details

Return Value: Boolean value, returns true if the linked document is disabled; otherwise returns false.

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support