How do multiple tr, in table in HTML change color by clicking on the text of td in tr

Code

<table>
    <tr id="1">
        <td class="td1">1</td>
        <td class="td2">2</td>
        <td class="td3">3</td>
    </tr>
    <tr id="2">
        <td class="td1">1</td>
        <td class="td2">2</td>
        <td class="td3">3</td>
    </tr>
    <tr id="3">
        <td class="td1">1</td>
        <td class="td2">2</td>
        <td class="td3">3</td>
    </tr>
</table>

if you click on the table in the above format, you want to click on a tr to change the color of the text in the current td, and click on another tr to change the color of the td in the newly clicked tr, and the original one will change back to the previous color. I tried jQuery for a long time, but I didn"t get it done. I hope God will give me some advice-sharp-sharp-sharp problem description

May.22,2021

like this?

<script>
    $('table tr').click(function () {
        $(this).find('td').addClass('redcolor');
        $(this).siblings().find('td').removeClass('redcolor');
    })
</script>
<style>
    .redcolor{
        color: red
    }
</style>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c3b1f9-3378a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c3b1f9-3378a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?