jquery - var toAdd = $('input[name=checkListItem]').val(); what does this code do? -


i understand declaration of toadd , .val(); does, can explain $('input[name=checklistitem]') means?

$('input[name=checklistitem]') select input elements having attribute name checklistitem

if there multiple input element of same name, it'll return list of elements.

selects elements have specified attribute value equal value.

docs: https://api.jquery.com/attribute-equals-selector/


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -