Quote:
- Code: Select all
<link rel="stylesheet" type="text/css" href="layout.css" id="style" />
alert(document.getElementById("style").getAttribute("href"));
|
Unfortunately, I am working on a web page that I am being "fed" that I have no control over. The <LINK> tag does not have an "id" and I cannot add an "id" to the <LINK> tag.
I am only able to manipulate/edit the page within the <BODY> section.
So... I need to DETECT which Stylesheet is specifically being used within the <LINK> tag without an "id".
There are a few different stylesheets that are being used. I need to know which stylesheet is the CURRENT one so that I can
counter-code (if that's a real word

) specific font colors, background colors, etc.
If you need futher explanation, I'll be happy to give deeper descriptions. But I think that I've covered the situation.
Thanks.