我有一张桌子
<table id="report">
<thead>
<tr>
<th class="first_name">First Name</th>
<th class="last_name">Last Name</th>
<th class="email">Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>Larry</td>
<td>Hughes</td>
<td>larry@gmail.com</td>
</tr>
<tr>
<td>Mike</td>
<td>Tyson</td>
<td>mike@gmail.com</td>
</tr>
</tbody>
</table>
我想根据传递给函数的标题选择所有行。这就是我的意思
function passTh(nm){
// for eg: nm will contain the class of the th "first_name"
var th = "." + nm;
// get index of th
// i have to select all cells in this column along with the header and hide them
}