我有下表:
<table>
<thead>
<tr>
<th class="tTle">Mon</td>
<th class="tTle">Tues</td>
<th class="tTle">Wed</td>
<tr>
</thead>
<tbody>
<tr>
<td>
<input type="text" class = "Val1"/>
<input type="text" class = "Val2"/>
<input type="button" class = "but" val="monday"/>
</td>
<td>
<input type="text" class = "Val1"/>
<input type="text" class = "Val2"/>
<input type="button" class = "but" val="tuesday"/>
</td>
<td>
<input type="text" class = "Val1"/>
<input type="text" class = "Val2"/>
<input type="button" class = "but" val="wednesday"/>
</td>
</tr>
<tr>
<td>
<input type="text" class = "Val1"/>
<input type="text" class = "Val2"/>
<input type="button" class = "but" val="monday"/>
</td>
<td>
<input type="text" class = "Val1"/>
<input type="text" class = "Val2"/>
<input type="button" class = "but" val="tuesday"/>
</td>
<td>
<input type="text" class = "Val1"/>
<input type="text" class = "Val2"/>
<input type="button" class = "but" val="wednesday"/>
</td>
</tr>
<tr>
<td>
<input type="text" class = "Val1"/>
<input type="text" class = "Val2"/>
<input type="button" class = "but" val="monday"/>
</td>>
<td>
<input type="text" class = "Val1"/>
<input type="text" class = "Val2"/>
<input type="button" class = "but" val="tuesday"/>
</td>
<td>
<input type="text" class = "Val1"/>
<input type="text" class = "Val2"/>
<input type="button" class = "but" val="wednesday"/>
</td>
</tr>
</tbody>
</table>
我想在单击时读取相应的thead
值?我怎样才能做到这一点?tTle
but
$(function ()
{
$(".but").click(readTitle);
});
});