我正在使用.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>