JSFiddle - React, Tailwind, and code Playground
HTML
<form id="target" action="destination.html">
<input type="text" value="Hello there" />
<input type="submit" value="Go" />
</form>
<div id="other">
Trigger the handler
</div>
JavaScript
$('#target').submit(function(event) {
event.preventDefault();
alert('Handler for .submit() called.');
});
$('#other').click(function() {
$('#target').submit();
});