Design an HTML page that contains four checkboxes with the values: Red, Green, Blue, and Black. Using jQuery functions you have to check whether the checkboxes are checked or not and also display a number of checkboxes checked. code example

Example: Design an HTML page that contains four checkboxes with the values: Red, Green, Blue, and Black. Using jQuery functions you have to check whether the checkboxes are checked or not and also display a number of checkboxes checked.

$(document).ready(function(){
        
            
             var numberOfChecked = $('input:checkbox:checked').length;
              	//alert(numberOfChecked);		  
           document.write(numberOfChecked);
        
    });

Tags:

Misc Example