简体   繁体   English

RadioButtonList中ListItem的Tab索引

[英]Tab Index for ListItems in RadioButtonList

Is it possible to set Tab Index for ListItems in RadioButtonList. 是否可以在RadioButtonList中为ListItem设置Tab Index。 Here is my code: 这是我的代码:

 <asp:RadioButtonList ID="radGender" runat="server">
      <asp:ListItem Value="M">Male</asp:ListItem>
      <asp:ListItem Value="F">Female</asp:ListItem>
      <asp:ListItem Value="U">Not Specified</asp:ListItem>
 </asp:RadioButtonList>

Thanks, Praveen 谢谢,Praveen

ASP.Net Cannot tab through all radio buttons when selected ASP.Net选中时无法通过所有单选按钮进行选项卡

Similar problem to yours. 你的类似问题。 This should help with what you need as well as solve the problem you run into after having a radio buttom selected. 这应该有助于您所需要的,以及解决您选择无线电接口后遇到的问题。

EDIT 编辑

Just to specify their solution. 只是指定他们的解决方案。 It seems after a choice is selected, using the arrow keys will let you move to the other choices where as tab will not. 选择一个选项后,使用箭头键可以让您移动到其他选项,而选项卡则不会。 Another solution to getting around this is to have individual radio buttons and group them using the group name property. 解决此问题的另一个解决方案是使用单独的单选按钮并使用组名属性对它们进行分组。

What's wrong with? 怎么了?

<asp:RadioButtonList ID="radGender" runat="server">
  <asp:ListItem Value="M" tabindex="1">Male</asp:ListItem>
  <asp:ListItem Value="F" tabindex="2">Female</asp:ListItem>
  <asp:ListItem Value="U" tabindex="3">Not Specified</asp:ListItem>
</asp:RadioButtonList>

Seem to work at least in IE9 and FF (not sure with others). 似乎至少在IE9和FF中工作(对其他人不确定)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM