JSFiddle - React, Tailwind, and code Playground
HTML
<div id="sel">
<input value="1">
<input value="2">
<input value="3">
</div>
JavaScript
var res = $("#sel input:nth-child(2)").val();
alert(res);
<div id="sel">
<input value="1">
<input value="2">
<input value="3">
</div>
var res = $("#sel input:nth-child(2)").val();
alert(res);