How to get value of selected radio button?

前端 未结 28 2237
温柔的废话
温柔的废话 2020-11-22 03:51

I want to get the selected value from a group of radio buttons.

Here\'s my HTML:

28条回答
  •  囚心锁ツ
    2020-11-22 04:35

    If you are using the JQuery, please use the bellow snippet for group of radio buttons.

    var radioBtValue= $('input[type=radio][name=radiobt]:checked').val();
    

提交回复
热议问题