JSFiddle - React, Tailwind, and code Playground

HTML

<input type="submit" value="click me" id="clickme" />

JavaScript

$('#clickme').keypress(function(e){
        if(e.which == 13){//Enter key pressed
            alert('Enter pressed: Submitting the form....');
        }
    });

$('#clickme').click(function(e){
alert("clicked");
    });