I have a table that when a tr is clicked, a screen is generated in the page itself according to what was selected, I need a css code (if possible), that when the tr is clicked it will have a different background of the others, when another tr is clicked, it has a different background like the: active of tag a. In my table each tr has a different id and name.
Table:
<tr id='ana' name='ana'>
<td>1</td>
<td>Ana</td>
<td>Informática</td>
</tr>
<tr id='bia' name='bia'>
<td>2</td>
<td>Bia</td>
<td>Logística</td>
</tr>
<tr id='carlos' name='carlos'>
<td>3</td>
<td>Carlos</td>
<td>Redes</td>
</tr>