HTML Question

racketboy

Established Member
OK, here's what I want to do:

I want to have a table with about 5 columns and 16 rows.

Each table cell will have a checkbox and a corresponding description.

But I want the background color of the cell to change when that cell's checkbox it either checked or unchecked.

Is there a way to do this?
 
Well I've got it to the point of changing the color to blue when you click on the checkbox, but I don't know how to change it back to white if you click it again (uncheck it)
 

Attachments

Maybe add a function that checks against a value in an array to see whether a cell has already been clicked or not? I think you might be able to do it with the addEventListener function as well, but I'm not sure how compatible that is.
 
Back
Top