2014-04-29 68 views
0

内的单选按钮,我有这样的代码:检查asp.net应用程序

<div class="divpere" > 
    <div class="divfille1" ><label>CIVILITE:</label></div> 
     <div class="divfille2" > 
     <input type="radio" ID="mademoiselle" runat="server" >Mademoiselle</input> 
     <input type="radio" ID="madame" runat="server">Madame</input> 
     <input type="radio" ID="monsieur" runat="server">Monsieur</input> 
     </div> 
    </div> 

这是一个labale和单选按钮的列表,当我尝试检查此单选按钮中的一个,它仍然没有检查! !

  • 这是什么原因?
  • 我该如何修复我的代码段?
+0

我敢打赌上一个CSS问题。如果你发布你的CSS或更好的小提琴会很好。 – Vel

回答

3

Demo Fiddle

<div class="divpere" > 
     <div class="divfille1" ><label>CIVILITE:</label></div> 
     <div class="divfille2" > 
     <input name="samename" type="radio" id="mademoiselle" runat="server" /><label for="mademoiselle"> Mademoiselle</label> 
     <input name="samename" type="radio" id="madame" runat="server"/><label for="madame">Madame</label> 
     <input name="samename" type="radio" id="monsieur" runat="server"/><label for="monsieur">Monsieur</label> 
     </div> 
</div> 

你应该提name attribute您的单选按钮和不要忘记提及同名值三个单选按钮...

+0

即使我添加'name'属性,我也有同样的结果 –