Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to numbers by checked in checkbox in javascript

function checkboxes(){
    var inputElems = document.getElementsByTagName("input"),
    count = 0;
    for (var i=0; i<inputElems.length; i++) {
    if (inputElems[i].type === "checkbox" && inputElems[i].checked === true){
        count++;
        alert(count);
    }
}}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #numbers #checked #checkbox #javascript
ADD COMMENT
Topic
Name
4+3 =