How can I unify text that take from multiple group radio button and multiple group checkbox?

前端 未结 3 564
[愿得一人]
[愿得一人] 2021-01-16 03:10

My javascript code like this :

$(function(){
    $(\'input[type=\"radio\"]\').click(function(){
        var $radio = $(this);
        var name = $(this).prop         


        
3条回答
  •  生来不讨喜
    2021-01-16 03:15

    You need to modify the input element selector to handle both input types checkboxes and radio buttons:

    $('.list-unstyled input').....
    

    Working Demo

提交回复
热议问题