JSFiddle - React, Tailwind, and code Playground

by Helmut Granda

HTML

<form name="form1">
    form 1: <input type="text" />
    <input type="submit" value="submit1" />
</form>


<form name="form2">
    form 2: <input type="text" />
    <input type="submit" value="submit2" />
</form>

JavaScript

$('form').click(function(event) {
    event.preventDefault();
  alert(event.target.value);
});