JSFiddle - React, Tailwind, and code Playground

by cchana

HTML

<form method="post" action="">
    <input type="text" name="submit1" id="submit1" />
    <input type="text" name="noSubmit1" id="noSubmit1" />
    <input type="text" name="submit2" id="submit2" />
    <input type="submit" />
</form>

JavaScript

$('#noSubmit1').keypress(function(event) {
    if (event.which == 13 ) {
        event.preventDefault();
    }
});