<bdo id='DriJR'></bdo><ul id='DriJR'></ul>

<legend id='DriJR'><style id='DriJR'><dir id='DriJR'><q id='DriJR'></q></dir></style></legend>
  • <tfoot id='DriJR'></tfoot>

    <small id='DriJR'></small><noframes id='DriJR'>

  • <i id='DriJR'><tr id='DriJR'><dt id='DriJR'><q id='DriJR'><span id='DriJR'><b id='DriJR'><form id='DriJR'><ins id='DriJR'></ins><ul id='DriJR'></ul><sub id='DriJR'></sub></form><legend id='DriJR'></legend><bdo id='DriJR'><pre id='DriJR'><center id='DriJR'></center></pre></bdo></b><th id='DriJR'></th></span></q></dt></tr></i><div id='DriJR'><tfoot id='DriJR'></tfoot><dl id='DriJR'><fieldset id='DriJR'></fieldset></dl></div>

      1. 使用 jquery 从广播组获取值

        时间:2023-10-21
      2. <tfoot id='EnlvJ'></tfoot>

                  <bdo id='EnlvJ'></bdo><ul id='EnlvJ'></ul>
                  <i id='EnlvJ'><tr id='EnlvJ'><dt id='EnlvJ'><q id='EnlvJ'><span id='EnlvJ'><b id='EnlvJ'><form id='EnlvJ'><ins id='EnlvJ'></ins><ul id='EnlvJ'></ul><sub id='EnlvJ'></sub></form><legend id='EnlvJ'></legend><bdo id='EnlvJ'><pre id='EnlvJ'><center id='EnlvJ'></center></pre></bdo></b><th id='EnlvJ'></th></span></q></dt></tr></i><div id='EnlvJ'><tfoot id='EnlvJ'></tfoot><dl id='EnlvJ'><fieldset id='EnlvJ'></fieldset></dl></div>

                  <legend id='EnlvJ'><style id='EnlvJ'><dir id='EnlvJ'><q id='EnlvJ'></q></dir></style></legend>
                • <small id='EnlvJ'></small><noframes id='EnlvJ'>

                    <tbody id='EnlvJ'></tbody>
                  本文介绍了使用 jquery 从广播组获取值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试获取名称为 managerelradio 的无线电组的值.这个电台组的 html 代码是.

                  I am trying to get value of radio group with name managerelradio. My html code for this radio group is.

                   <label><input type="radio" name="managerelradio" value="Yes" id="Add">Add</label>
                   <label><input type="radio" name="managerelradio" value="No" id="Remove">Remove</label>
                  

                  Jquery 是这样的..

                  and Jquery for this is..

                      var manageradiorel = $('input[name = "managerelradio"]:checked' , '#managechildform').val();
                   alert(manageradiorel);
                  

                  它显示我未定义.

                  虽然我也试过了.

                   var manageradiorel = $('input[name = "managerelradio"]:checked').val();
                   alert(manageradiorel);
                  

                  但我仍然得到未定义的值.

                  But still I am getting undefined value.

                  推荐答案

                  试试这个

                  var manageradiorel = $("input:radio[name ='managerelradio']:checked").val();
                  alert(manageradiorel);
                  

                  请检查这个 DEMO ..它会正常工作

                  Plese check this DEMO ..it will work fine

                  注意:必须选择您的单选按钮之一.否则会返回 undefined

                  Note: One of your radio button must be selected. Otherwise it will return undefined

                  您可以使用 checked 属性将单选按钮设为默认选择

                  You can use checked attribute to make a radio button selected as default

                  这篇关于使用 jquery 从广播组获取值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:使用“标签为"在单选按钮上 下一篇:选择单选按钮时显示 div

                  相关文章

                  <small id='AlWMC'></small><noframes id='AlWMC'>

                  <legend id='AlWMC'><style id='AlWMC'><dir id='AlWMC'><q id='AlWMC'></q></dir></style></legend>
                    <bdo id='AlWMC'></bdo><ul id='AlWMC'></ul>
                  <tfoot id='AlWMC'></tfoot>

                  1. <i id='AlWMC'><tr id='AlWMC'><dt id='AlWMC'><q id='AlWMC'><span id='AlWMC'><b id='AlWMC'><form id='AlWMC'><ins id='AlWMC'></ins><ul id='AlWMC'></ul><sub id='AlWMC'></sub></form><legend id='AlWMC'></legend><bdo id='AlWMC'><pre id='AlWMC'><center id='AlWMC'></center></pre></bdo></b><th id='AlWMC'></th></span></q></dt></tr></i><div id='AlWMC'><tfoot id='AlWMC'></tfoot><dl id='AlWMC'><fieldset id='AlWMC'></fieldset></dl></div>