THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Link disabled Property

Link Object Reference Link Object

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

Internet Explorer Firefox Opera Google Chrome Safari

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
  • true - The linked document is disabled
  • false - The linked document is not disabled

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 Reference Link Object