JSFiddle - React, Tailwind, and code Playground
by devcurry_com
HTML
<input id="txt1" type="text" value="one"/>
<input id="txt2" type="text" value="two" />
<input id="txt3" type="text" value="three" />
JavaScript
$(function () {
var arr = $("input[type=text]")
.map(function () {
return this.id;
}).get();
alert(arr);
});