JSFiddle - React, Tailwind, and code Playground

HTML

<form action="http://www.google.com" method="get" id="thisform">
    <input id="test" type="text" value="hello" name="q"/>
</form>

JavaScript

$('#thisform').submit(function() {alert(test.value); return true;})

$("#thisform").trigger('submit');