【发布时间】:2017-06-27 13:36:04
【问题描述】:
嗨,我的页面布局如下图所示
我想要的是点击大小复选框内部单选按钮自动检查,然后点击石头重置内部单选按钮列表进行自动检查。
我的 HTML 代码看起来像
<asp:DataList ID="dtbindjewellery" runat="server" OnItemDataBound="dtbindjewellery_ItemDataBound" Width="100%">
<ItemTemplate>
<div class="col-md-12 col-sm-12 col-xs-12 jewelerymain">
<asp:CheckBox ID="Servicechkbox" runat="server" Text='<%#Eval("ServiceName")%>' />
<asp:HiddenField ID="hdserviceid" runat="server" Value='<%#Eval("ServiceId")%>' />
</div>
<%-- Sizing Radiobutton--%>
<div id="divsizing" runat="server" class="col-md-12 col-sm-12 col-xs-12 subservices" visible="false">
<asp:RadioButton ID="rdsizing1" runat="server" GroupName="ringsize" />
<asp:DropDownList ID="ddselectSize" runat="server"></asp:DropDownList>
<br />
<asp:RadioButton ID="rdsizing2" runat="server" GroupName="ringsize" />
<asp:TextBox ID="txtsize" runat="server" CssClass="txtNumericUpDownExtender"></asp:TextBox>
</div>
<%-- Stone resetting Radiobutton--%>
<asp:RadioButtonList ID="radiosub" runat="server"></asp:RadioButtonList>
</ItemTemplate>
</asp:DataList>
这里的尺寸有 2 个独特的单选按钮,而石头重置有单选按钮列表。
我根据不同的id绑定它,checkbox和radio的id在数据列表中得到变化。
我应该如何在 javascript 中对复选框单击进行验证?
【问题讨论】:
标签: javascript c# jquery asp.net datalist