jquery: how to check if all radio buttons in a div are selected

前端 未结 8 1098
一向
一向 2021-02-07 02:13

my html looks like this

8条回答
  •  后悔当初
    2021-02-07 02:57

    This will work:

    if($("#div1").children("input:radio:checked").size() == 3) 
    {
       alert('three inputs were checked'); 
    }
    

提交回复
热议问题