JSFiddle - React, Tailwind, and code Playground

HTML

<form id="form" action="/">
    <label for="input">Press enter in the box</label>
    <input type="text" id="input1" name="input1" value="">
    <input type="hidden" id="input2" name="input2" value="">
    <!--<input type="text" id="input3" name="input3" value=""> uncomment to prevent enter correctly -->
    <button type="submit" id="submit_button" disabled>Submit</button>
</form>

JavaScript

$('#form').on('submit', function (e) {
    e.preventDefault();
    alert('form submit');
});