I am working with a dynamically generated table where each row has a button.
My goal is to retrieve the text from a specific cell when the button in that particular row is clicked.
For example:
Here is an example of my table structure:
<table>
<tr>
<td>Test 1 Here</td>
<td>Other Text Here</td>
<td><button onclick="getData(this.cell[1].innerHtml)">Get Data</button></td>
</tr>
</table>
How can I achieve this using either pure JavaScript or TypeScript?