目前,我有这个:
<asp:CheckBoxList ID="chkSections" runat="server" onselectedindexchanged="chkSections_SelectedIndexChanged"></asp:CheckBoxList>
...这会产生:
<table border="0" id="ctl00_cpBody_chkSections">
<tbody><tr>
<td><input type="checkbox" name="ctl00$cpBody$chkSections$0" id="ctl00_cpBody_chkSections_0"><label for="ctl00_cpBody_chkSections_0">All Sections</label></td>
</tr><tr>
<td><input type="checkbox" name="ctl00$cpBody$chkSections$1" id="ctl00_cpBody_chkSections_1"><label for="ctl00_cpBody_chkSections_1">Personal Health Status and Health History</label></td>
</tr><tr>
<td><input type="checkbox" name="ctl00$cpBody$chkSections$2" id="ctl00_cpBody_chkSections_2"><label for="ctl00_cpBody_chkSections_2">Physical Activity and Fitness</label></td>
</tr>
</tbody></table>
问题:我希望input
生成的所有字段都有一个特定的类。不想用jQuery。