JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" id="1" />
<span class="input-group-btn">
<button type="button">Go!</button>
</span>

JavaScript

$('button').click(function () {
    var inputcontent = $(this).parent().prev().attr('id');
    console.log(inputcontent);
});