JQuery: How to get selected radio button value?

前端 未结 11 1278
北海茫月
北海茫月 2020-12-08 06:50

How do I default the value of a non-selected radio button to 0?

I have the following HTML:



        
11条回答
  •  甜味超标
    2020-12-08 07:21

    This Jquery method returns the default vale 0 when page loads...

    $('input[type="radio"]:checked').val();
    

提交回复
热议问题