JSFiddle - React, Tailwind, and code Playground
HTML
<form name="formName" id="formId">
<input name="a" type="checkbox" />
<input name="b" type="text" />
<select name="c" >
<option>stuff</option>
</select>
<textarea name="d" ></textarea>
</form>
<input name="xa" type="checkbox" />
<input name="xb" type="text" />
<select name="xc" ><option>other stuff</option></select>
<textarea name="xd" ></textarea>
CSS
form { border: 1px solid black; }
JavaScript
$('form[name=formName]').find('input, textarea, select').each(function() {
alert($(this).attr('name'));
});