1

大家好,我有一些与每个广播按钮相对应的广播按钮和文本框。我想做的是检查单个单选按钮时,请从以下格式显示相应的文本框。

        @foreach(var item in Viewbag.Ids)
        {
         <div class="group">
          <label class="label">
           @Html.RadioButton("Rdbtn",new{value=@item.value})
          </label>
            <div class="control">
                  <input type="text"  />
            <div>
        </div>

在另一种情况下

       <div>
        @Html.RadioButtonFor(m=>m.IsFlat)
        @Html.RadioButtonFor(m=>m.IsFree)
        @Html.RadioButtonFor(m=>m.IsTax)
        @Html.DropDownListFor(m=>m.Products)
       </div>

我在做什么上面只有一个单选按钮必须在选中一个时选中另一个应该取消选中我这样做是这样的

   $('input[type=radio]').change( function(){
    if(this.checked)
        {
                  $(this).closest('div').find('input[type=radio]').not(this).attr('checked',false)
        }
     }); 

这工作正常,我想在检查“@Html.RadioButtonFor(m=>m.IsTax)”时播放 dropdwon 我该怎么做,如果选中,我必须在编辑模式下检查单选按钮谁能帮我做这件事

如果在编辑时插入时选中了单选框,我必须选中它们检查该单选按钮并显示下拉菜单

4

0 回答 0