JSFiddle - React, Tailwind, and code Playground
HTML
<form id="theform">
<input type="text" id="fname" />
<input type="text" id="lname" />
<input type="text" id="country" />
</form>
<input type="submit" />
JavaScript
$('input[type="submit"]').click(function(){
//$('#theform').submit()
document.getElementById('theform').submit()
})
$('#theform').submit(function(e){
alert(0)
e.preventDefault()
})