I have a table row, and within that, I have a td (whatever it stands for). I would like to change the class attribute of the TR my TD is in without using an ID or a name. Like that:
<tr>
<td onclick="[TR].setAttribute('class', 'newName')">My TD</td>
</tr>
How do I do it?
tdstands for table data..now .. in your case you need the
parentNodeproperty of thetd..or as bobince suggested in his comment