JSFiddle - React, Tailwind, and code Playground
JavaScript
//Simulate dynamically generated textbox
$("body").append("<input type='text' class='textbox' />");
// Now bind the event
$('.textbox').on('keyup', function(e) {
//alert(e.keyCode);
if(e.keyCode == 13) {
alert('Enter key was pressed.');
}
});