0
我正在嘗試製作一組可供選項卡索引訪問的單選按鈕。我現在面臨的問題是,我不能指定RadioButtonFor幫手用Tab鍵索引功能如何在選項卡結構中定位HTML助手RadioButtonFor
<div class="col-sm-12 app-label-text">
@if (Model.Member == null)
{
@Html.RadioButtonFor(m => m.foo, "true", Yes)<text> Yes </text>
@Html.RadioButtonFor(m => m.foo, "false", No)<text> No</text>
}
else
{
if ((bool)Model.foo.Value)
{
@Html.RadioButtonFor(m => m.foo, "true", YesChecked)<text> Yes </text>
@Html.RadioButtonFor(m => m.foo, "false", No)<text> No</text>
}
else
{
@Html.RadioButtonFor(m => m.foo, "true", Yes)<text> Yes </text>
@Html.RadioButtonFor(m => m.foo, "false", NoChecked)<text> No</text>
}
}
</div>
我寧願用乾的jQuery呼叫針對這些要做到這一點,而無需針對不同的ID號,如果可能的
非常感謝你,這完美的作品,後來我才意識到,問題是,我是努力的目標,可以使一個元素,但在那個時候被禁用。 – Joshua