var inputs = document.querySelectorAll("input[type=checkbox]"); for(var x = 0; x < inputs.length; x++) { console.log(inputs[x].name) }