JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<input type="text">
<button type="submit" class="test test1"></button>
<input type="text">
<button type="submit" class="test test2"></button>
<input type="text">
<button type="submit" class="test test2"></button>
</form>
JavaScript
$('form').submit(function(e) {
e.preventDefault();
})
$('.test').click(function(e) {
alert(e.currentTarget.classList);
})