W3C home > Mailing lists > Public > www-style@w3.org > March 2003

Re: CSS class and changing with javascript

From: Steve H <steveftc@hotmail.com>
Date: Sat, 29 Mar 2003 23:02:42 -0500 (EST)
Message-ID: <F18BH5EfR3ljnzETDMx000465c5@hotmail.com>
To: www-style@w3.org

Hey Jonathan,
You need to access the object whose style you're changing, instead of trying 
to access the class. I've gotten this to work:

function changeIt(obj)\
obj.style.color = "red";
<td id="objectOne" class="classOne" 

Let me know if you have any problems, questions, etc..


STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
Received on Monday, 31 March 2003 07:18:02 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:06 UTC