【发布时间】:2012-05-22 01:19:20
【问题描述】:
我正在开发一个使用 .net 构建的网站,我正在尝试输出我的标记...
<span class="check-input">
<!-- Terms -->
<input type="checkbox" id="terms" class="terms checkbox">
<label for="terms">I agree to the terms and conditions</label>
<input type="checkbox" id="age" class="age checkbox">
<label for="age">I am over 18 years old</label>
</span>
只有我的开发人员编写的代码是...
<!-- Terms -->
<asp:CheckBox ID="CB_Agree"
Text="I agree to the terms and conditions" runat="server" TabIndex="4" />
<asp:CheckBox ID="CB_Age"
Text="I am over 18 years old" runat="server" TabIndex="5" />
这是将我的数据输出为...
<span class="check-input">
<!-- Terms -->
<span class="terms checkbox">
<input type="checkbox" tabindex="4" name="ctl00$ContentPlaceHolder1$CB_Agree" id="ctl00_ContentPlaceHolder1_CB_Agree">
<label for="ctl00_ContentPlaceHolder1_CB_Agree">I agree to the terms and conditions</label>
</span>
<span class="age checkbox">
<input type="checkbox" tabindex="5" name="ctl00$ContentPlaceHolder1$CB_Age" id="ctl00_ContentPlaceHolder1_CB_Age">
<label for="ctl00_ContentPlaceHolder1_CB_Age">I am over 18 years old</label>
</span>
</span>
【问题讨论】:
-
不确定您的确切问题是什么。
-
请注意,回答您问题的人似乎也不知道。有人回答如何调整课程,有人回答如何使客户端 ID 匹配...
-
您能否澄清问题,以便我们尝试帮助您?
标签: c# asp.net .net css checkbox