我正在寻找如何在标题上添加一个复选框的方法,该复选框支持选中或取消选中我的 girdview 的所有复选框列。
<table class="grid">
<th><input type="checkbox" name="chkall"/></th>
<th>Name</th>
<tr>
<td>
<input type="checkbox" id="chkItem_1"/>
</td>
<td>
Category 1
</td>
</tr>
<tr>
<td>
<input type="checkbox" id="chkItem_2"/>
</td>
<td>
Category 2
</td>
</tr>
</table>