[thelist] link rel disabled attribute

Mark Hadley mail at mark-hadley.freeserve.co.uk
Sat Feb 24 19:36:03 CST 2001


Hi,

Does anyone know anything about the disabled attribute of the link tag. You
can use it like this:

<link rel="stylesheet" type="text/css" href="a.css" id="style1" disabled />

You can then set it to true or false using javascript i.e.

if (document.getElementById){
document.getElementById('style1').disabled=false;
}

I think it's an IE4 tag, but after some testing it seems to work in NN4,
NN6, and IE5.5. I've been using it to switch stylesheets on and off, either
multiple stylesheets, or as above to exclude the stylesheet for all browsers
except DOM compliant ones.

It's really handy, i just wondered if anyone had come across any problems
with this attribute? (btw, it doesn't validate!)

Mark.







More information about the thelist mailing list