JSFiddle - React, Tailwind, and code Playground
by benhowdle89
HTML
<form id="myForm">
<label>Name: </label><input />
<input type="submit">
</form>
JavaScript
var form = document.getElementById('myForm');
form.onsubmit = function(e){
e.preventDefault();
alert('hey');
}