Javascript change style of td element using tr id

Viewed 28485

I have one table:

<table>
    <tr id="436">
       <td>1</td>
       <td>2</td>
       <td>3</td>
    </tr>
</table>

Now I need using Javascript to get tr element using id and then in that tr add CSS style of changing text color.

I have try getelementbyid("436") but I don't know how to do next.

So I need to get this:

  <table>
    <tr id="436">
       <td style="color: red">1</td>
       <td style="color: red">2</td>
       <td style="color: red">3</td>
    </tr>
  </table>
2 Answers
Related