JSFiddle - React, Tailwind, and code Playground

HTML

<script>
    function sub(e)
    {
        alert(e.parentNode);
    }
</script>
<form>
    <a href="#" onclick="sub(this)">Submit</a>
</form>