sugan Posted September 20, 2007 Report Share Posted September 20, 2007 Hi,I want to access the class elements written inside the css files using the DOM. I know how to access the form elements dynamically using DOM but don't know about the contents of the css files. Actually can i do this? If yes then how?Regards,Sugan Link to comment Share on other sites More sharing options...
aspnetguy Posted September 20, 2007 Report Share Posted September 20, 2007 I don't think this is possible as it is not part of the document. If you had the CSS in <style></style> in the head then you could get the style element and parse the innerHTML but I doubt there is a way to do that with an external file. Link to comment Share on other sites More sharing options...
jesh Posted September 20, 2007 Report Share Posted September 20, 2007 I think you can access the external stylesheet using the DOM because it becomes part of the DOM when you use a link element to link the stylesheet.Check out this link:http://www.quirksmode.org/dom/changess.html Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now