In jQuery, how do I get the value of a radio button when they all have the same name?

前端 未结 7 1013
[愿得一人]
[愿得一人] 2020-11-28 04:44

Here is my code:

Sales Promotion
7条回答
  •  长情又很酷
    2020-11-28 04:51

    DEMO : https://jsfiddle.net/ipsjolly/xygr065w/

    $(function(){
        $("#submit").click(function(){      
            alert($('input:radio:checked').val());
        });
     });
    

提交回复
热议问题