$(document).ready(function() { $('tr').click(function(event) { $(':checkbox', this).trigger('click'); }); });
<table class="table"> <tr> <td><input type="checkbox" /></td> <td>項目11</td> <td>項目12</td> </tr> <tr> <td><input type="checkbox" /></td> <td>項目21</td> <td>項目22</td> </tr> <tr> <td><input type="checkbox" /></td> <td>項目31</td> <td>項目32</td> </tr> <tr> <td><input type="checkbox" /></td> <td>項目41</td> <td>項目42</td> </tr> </table>
.table { width: 100%; border-collapse: collapse; } .table tr:hover { background: #eee; } .table td { border: 1px solid #eee; }