Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Extracting properties from a custom class with Javascript

0 views
Skip to first unread message

Steve Ricketts

unread,
Nov 10, 2006, 12:06:51 PM11/10/06
to
I've defined a custom class, .msgBackground, in a CSS and appied it to a
<div ID=message class="msgBackground">. Depending on which page you are
in, the properties of the class changes. I would like to extract the
background-color property from that element in Javascript but nothing I try
works.

Any direction would be greatly appreciated.

Steve


Alex

unread,
Jan 4, 2007, 10:12:42 PM1/4/07
to
Hi, Steve

Try document.getElementById("message").currentStyle.backgroundColor

- Alex.


0 new messages