I want to change the background color of the table cell when radio button inside the cell is clicked.
相关标签:
-
2020-12-25 10:29
Using plain javascript:
element.parentNode
In jQuery:
element.parent()
-
2020-12-25 10:36
Use the change event of the select:
$('#my_select').change(function()
{
$(this).parents('td').css('background', '#000000');
});
|