X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

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

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook