JSFiddle - React, Tailwind, and code Playground
by Paulpro
HTML
<form id="theform" action="http://google.com" method="get">
<input type="text" name="q" value="Example" />
<input type="submit" value="Go"/>
</form>
JavaScript
$('#theform').submit(function() {
alert('Form submission event handler');
$(this).unbind('submit');
$.get('/', function() {
$('#theform').submit();
});
return false;
});