mercredi 7 juin 2017

querySelectorAll checked values

I have a list/group of checkboxes, that made by php; put in name="item[]" html property, and then follow with this:

 var list = document.querySelectorAll("input[name^='item[']")

So far, works well. I need to count only the checked ones, not all like:

 list.length

How can I access the values for eachone to check "checked" property or value?




Aucun commentaire:

Enregistrer un commentaire