1
That code counts how many checkbox
were marked.
How can I make sure he doesn’t count checkbox disabled
<script type='text/javascript'>//<![CDATA[
window.onload=function(){
var contador = function() {
var n = $( "input:checked" ).length;
$("#checkcount").text( n + (n === 1 ? " é" : " são") + " selecionados" );
};
contador();
$( "input[type=checkbox]" ).on( "click", contador );
}//]]>
</script>
<input type="checkbox" name="check1" disabled value="1">
<input type="checkbox" name="check1" disabled value="2">
<input type="checkbox" name="check1" value="3">
<input type="checkbox" name="check1" value="4">
<input type="checkbox" name="check1" value="5">
<div id="checkcount"></div>