Capturing the Input of an Input field


#1

Could someone please explain the "'input[name=checkListItem]')" part of the code ? Rest all is clear to me.


var toAdd = $('input[name=checkListItem]').val();


#2

This targets an <input> element with a name attribute set to checkListItem. The generic term is, attribute selector.

<input name="checkListItem">

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.