How to get the selected value of the radio button list in jquery?

后端 未结 2 1336
半阙折子戏
半阙折子戏 2020-12-05 22:51

I have radio button list which has id as the value, I want to access the selected id in the jquery function.

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-05 23:28

    It will get the selected value of the radiobutton at button click.
    ex for list

    $("#btn").click(function() {
       $('input[type="radio"]:checked').val();
    });
    

提交回复
热议问题