JSFiddle - React, Tailwind, and code Playground

HTML

<table id="t1">
    <tbody>
        <tr>
            <td>
                <a id="results" onclick="test(this)">Not found!</a>
            </td>
        </tr>
    </tbody>
</table>

JavaScript

function test(sender) {
    var t1 = document.getElementById('t1');
    for (var i = 0; i < t1.rows.length; i++) {
        if(t1.rows[i].cells[0] === sender.parentNode) {
            sender.innerHTML = "Found in row " + i + "!";
        }
    }
}