Link disabled Property
Example
Disable the linked document:
document.getElementById("myLink").disabled = true;
Try it yourself »
Definition and Usage
The disabled property sets or returns whether the linked document is disabled, or not.
This property is currently only used with style sheet links.
When set to true, the linked style sheet will not have any effect.
Browser Support
The disabled property is supported in all major browsers.
Syntax
Return the disabled property:
linkObject.disabled
Set the disabled property:
linkObject.disabled=true|false
Property Values
Value | Description |
---|---|
true|false |
Specifies whether the linked document is disabled or not
|
Technical Details
Return Value: | A Boolean, returns true if the linked document is disabled, otherwise it returns false |
---|
More Examples
Example
Find out if the linked document is disabled or not:
var x = document.getElementById("myLink").disabled;
The result of x will be:
false
Try it yourself »
Link Object