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;
Example 2
Check if the linked document is disabled:
var x = document.getElementById("myLink").disabled;
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.
|
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 |