[Javascript] Changing the CSS class of an element
Terry Riegel
riegel at clearimageonline.com
Tue May 18 09:23:42 CDT 2004
Is there a way to change the class of an element
For example:
I would like to change
<td class="blue" id="mytablecell">
to
<td class="green" id="mytablecell">
currently I am doing something like this.
document.getElementById('mytablecell').style.backgroundColor =
'#ffffff';
I would prefer to change the whole style if I can then I can change a
lot of things at once.
Terry Riegel
-----------------
MAILKEY: 2524427349
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 511 bytes
Desc: not available
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20040518/fd29d641/attachment.bin>
More information about the Javascript
mailing list