jQuery see if any or no checkboxes are selected

前端 未结 8 1698
被撕碎了的回忆
被撕碎了的回忆 2020-12-02 13:41

I know how to see if an individual checkbox is selected or not.

But Im having trouble with the following - given a form id I need to see if any of the check

8条回答
  •  借酒劲吻你
    2020-12-02 14:21

    This is what I used for checking if any checkboxes in a list of checkboxes had changed:

    $('input[type="checkbox"]').change(function(){ 
    
            var itemName = $('select option:selected').text();  
    
             //Do something.
    
    });     
    

提交回复
热议问题