View Single Post
  #1 (permalink)  
Old Nov 22nd, 2006, 23:22
mar2195 mar2195 is offline
New Member
Join Date: Nov 2006
Location: MD
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Possible to detect which stylesheet in use?

Is it possible to use Javascript to detect which stylesheet is currently being used in a page?

... a script to detect the HREF value in the <link> tag which is located in the <HEAD> of the page.

IMPORTANT:
I need to place this javascript "detect" after the <BODY> tag! (= cannot place this script in the <HEAD>)

EXAMPLE:
Code: Select all
<html>
<head>
<link rel="stylesheet" href="main.css" type="text/css">
</head>
<body>
blah, blah....
<script> detectCurrentStylesheetBeingUsed() </script>
</body>
</html>
My guess is that this cannot be done ... but I'd like to hear from others.


Thanks.
Reply With Quote