I have something like this:
\' onclick=\"SetBackgroundColor(this)\" style=\"background-color:Yellow\">
Whe
-
A simpler solution is to probably use a selector for all rows in the table or addClass.
Example
$("#myTable tr").click(function() {
$(this).css('background-color', '#f00');
});
or
$("#myTable tr").click(function() {
$(this).addClass('selected');
});
- 热议问题