JSFiddle - React, Tailwind, and code Playground

HTML

<script>
    function run_tr() {
        alert('Tr clicked');
    }
    
    function run_td( event ) {
        if ( event.stopPropagation ) { 
            event.stopPropagation();
        }
        event.cancelBubble = true;
        alert('Td button clicked');
    }    
</script>
<table width=500 border=1>
    <tr onclick="run_tr();">
        <td>
            <input type="button" onclick="run_td(event);" value="sometext"/>
        </td>
    </tr>
</table>