JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="example" />
JavaScript
$(document).ready(function() {
$("#example").keypress(function(event) {
alert(event.keyCode);
});
});
<input type="text" id="example" />
$(document).ready(function() {
$("#example").keypress(function(event) {
alert(event.keyCode);
});
});