how to get multiple checkbox value using jquery

前端 未结 12 746
终归单人心
终归单人心 2020-11-29 20:11

How can I get the value of checkboxes which are selected using jquery? My html code is as follows:



        
12条回答
  •  一整个雨季
    2020-11-29 20:21

    $(document).ready(function(){
    $(".chk").click(function(){
    var d = $("input[name=test]"); if(d.is(":checked")){
    //
    }
    });
    });
    
     `test1`
     `test2`
     `test3`
    

提交回复
热议问题