M
Michael
How can I use onclick to change a table cell background color. I know
I can use this.className=?
to change the classname. But then I would have to put the code into
every single table cell. I read once about using a collection method.
Lets say a table has 100 TD Cells with a white background. I want to
click on just 1 and then have it change to a Yellow background. Then
when I click on a different Cell have the old one change back to white
and the new Cell change to Yellow. etc.
I can use this.className=?
to change the classname. But then I would have to put the code into
every single table cell. I read once about using a collection method.
Lets say a table has 100 TD Cells with a white background. I want to
click on just 1 and then have it change to a Yellow background. Then
when I click on a different Cell have the old one change back to white
and the new Cell change to Yellow. etc.