I\'m trying to study for my exam and I thought I was doing this right... I want to change the color of the table (font or background) depending on which cell you click I thought
Change getLementbyId
and getElementbyId
to getElementById
and change font.color
to color
.
function changeFont(color){
document.getElementById("miTabla").style.color = color;
}
function changeBack(color){
document.getElementById("miTabla").style.backgroundColor = color;
}
changeFont
might also be more appropriately named changeForeground
.