J
jebe
Hi all,
I just struggling with the follwing problem: I have defined a style
class
..myClass {
color: ....
font-weight: ...
margin:...
...
}
and by using JavaScript I now want to assign the whole class to an HTML
element (a table cell).
The only topics I found were about how to assign a style attribute
(like color:
document.forms['myform'].elements[myElement].style.color = '#FF0000';
)
I have tried a lot but did not get the right syntax to assign my whole
style class "myClass" instead of just the attribute.
Isn't it possible or how is the correct syntax?
Thanks in advance
John
I just struggling with the follwing problem: I have defined a style
class
..myClass {
color: ....
font-weight: ...
margin:...
...
}
and by using JavaScript I now want to assign the whole class to an HTML
element (a table cell).
The only topics I found were about how to assign a style attribute
(like color:
document.forms['myform'].elements[myElement].style.color = '#FF0000';
)
I have tried a lot but did not get the right syntax to assign my whole
style class "myClass" instead of just the attribute.
Isn't it possible or how is the correct syntax?
Thanks in advance
John