Capturing the Input of an Input field


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

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


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

<input name="checkListItem">


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