Hello there ,
I am creating a website about the periodic table of elements and want to use Java with it.
The element needs to turn red when pressed and thats working.
I have 118 elements who needs that function.
Is there a shorter way to that instead of having 118 functions doing this?
<td class="lanthaniden fblok" id="Lu" onclick="activeerLu()">71<br>Lu</td>
function activeerCn(){
document.getElementById("copernicium").style.displ ay = 'block';
document.getElementById("Cn").style.backgroundColo r = "red";
}
Thank you in advance.
Greetings,
Tim