JSFiddle - React, Tailwind, and code Playground
HTML
<table width="100%">
<tr>
<td style="width: 10%; vertical-align:top;">Field:</td>
<td id="InputContainer">
<div id="divInput1" style="display: inline;">
<input id="txtComment1" name="txtComment" type="text" maxlength="35" />
<input id="btnDelete1" value="X" type="button" name="btnDelete" onclick="RemoveItem(this)" />
</div>
</td>
</tr>
</table>
JavaScript
function RemoveItem(button) {
var container = document.getElementById("InputContainer");
var tmpField = button.parentNode;
alert("Field: " + tmpField.id);
}