function countChecked() {
var n = $("input:checked").length;
$("div.result").text(n + (n <= 1 ? " is" : " are") + " checked!");
}
$(documnet).ready(function(){
countChecked()
;
});
Html:
<body>
<div class="result"><!-- result --></div>
</body>
No comments:
Post a Comment